PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
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
(http://www.cygwin.com) environment under Windows.

First - you need to have Sybase OpenClient installed. This is pretty
easy to get from http://www.sybase.com/ase_1252devel/.

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
http://www.peppler.org/downloads/cygwin.tar.gz. 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 http://www.peppler.org/downloads/).
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
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org                       http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or 
long term contract positions - http://www.peppler.org/resume.html