Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: DBD::Sybase under Cygwin
Date: Nov 25 2004 1:49PM

Here's a little how-to to build DBD::Sybase in the Cygwin
( environment under Windows.

First - you need to have Sybase OpenClient installed. This is pretty
easy to get from

Second, you need to map the entry points to the Sybase DLLs to something
that gcc can use. I've built a set of .a files (libcs.a, libct.a and
libblk.a) that provide these entry points - you can get them from Install the .a files in
/usr/local/lib so that the build will find them easily.

Third, grab the most recent "dev" release of DBD::Sybase 1.04_14 or
later, available from
Now build this as usual (perl Makefile.PL, etc) making sure that the
SYBASE and SYBASE_OCS environment variables are set correctly.

Et voilą!

If you don't want to download/use the dev release, you can achieve the
same result like this:

After installing the cygwin libct/cs/blk.a files, run perl Makefile.PL
in the DBD::Sybase source directory. Now edit the generated Makefile,
and add -D_MSC_VER=800 to the CCFLAGS macro, and change the EXTRALIBS
and LDLOADLIBS macros to
EXTRALIBS= -lcs -lct -lblk
LDLOADLIBS= -lcs -lct -lblk

and now run make.

For those of us who prefer a Unix-like feel this gives a nice
alternative to the ActiveState version of perl.

Michael Peppler                              Data Migrations, Inc.             
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or 
long term contract positions -