Mail Archives: cygwin/1999/12/16/05:43:12
I have succeeded in using the Sybase client libraries with Cygwin. This
was achieved by following the archive mail:
http://sourceware.cygnus.com/ml/cygwin/1999-08/msg00148.html
and a follow up question with its author, Vadim Beloborodov (who should
take the credit; I'm just documenting).
To use the Sybase libraries, then:
1. create .a files from the .lib files. I could not get the Cygwin-
documented method (using nm) to work, but the following does work:
#! /bin/sh
cd $SYBASE/lib
for i in libblk libcs libct libsybdb ; do
echo "LIBRARY ${i}" >${i}.def
echo "EXPORTS" >>${i}.def
strings ${i}.lib | grep _imp | sed s/__imp__// >>${i}.def
dlltool --dllname ${i}.dll --def ${i}.def --output-lib ${i}.a -k
done
2. In your source modify prototypes for callbacks (for UNIX is _ctype,
for NT is __stdcall)
3. When compiling, define _MSC_VER=800
This gives the prototypes the appropriate calling convention (for
NT newbies such as myself, this is usually __stdcall, which explains
the @n's at the end of function names, and __cdecl for variable argument
functions)
In some older headers, vararg functions such as dbfcmd are not handled
correctly. I had to change csconfig.h to define CS_VARARGS __cdecl ,
but this is not necessary with later header files.
Peter Hudson
Telnet Research Ltd
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -