This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

problem when linking against Sybase dll with cygwin


Hi,
I'm trying to compile some libraries of us which need Sybase dll. I found that this guy, Michael Peppler http://www.cygwin.com/ml/cygwin/2004-11/msg00955.html had the same problem, but his comments aren't enough for me to get rid of it.
Linking against sybase dll is succesfull, but strangely execution fails, and a gdb session shows me it is during a call to a Sybase fonction, and not one we wrote (the parameters passed are OK).
I found that It was better to link agains import libraries, which can be generated when one has .lib files. That's what I did, following the procedure described in http://www.cygwin.com/cygwin-ug-net/dll.html (Linking against DLL).
My def file has reference to functions which end with @n where n is number so linking fails (same as Michael Peppler). I redefined _MSC_VER=800 and finally got as result :
spg_sybase.o:spg_sybase.c:(.text+0xa50): undefined reference to `dbbind@20'
spg_sybase.o:spg_sybase.c:(.text+0xaa8): undefined reference to `dbbind@20'
spg_sybase.o:spg_sybase.c:(.text+0xb00): undefined reference to `dbbind@20'
spg_sybase.o:spg_sybase.c:(.text+0xb58): undefined reference to `dbbind@20'
spg_sybase.o:spg_sybase.c:(.text+0xbb0): undefined reference to `dbbind@20'
spg_sybase.o:spg_sybase.c:(.text+0xc68): more undefined references to `dbbind@20
' follow
spg_sybase.o:spg_sybase.c:(.text+0xdf4): undefined reference to `dbfcmd@0'
spg_sybase.o:spg_sybase.c:(.text+0xe08): undefined reference to `dbfcmd@0'
spg_sybase.o:spg_sybase.c:(.text+0xe20): undefined reference to `dbfcmd@0'
spg_sybase.o:spg_sybase.c:(.text+0xe34): undefined reference to `dbfcmd@0'
spg_sybase.o:spg_sybase.c:(.text+0xe43): undefined reference to `dbsqlexec@4'
spg_sybase.o:spg_sybase.c:(.text+0xe90): undefined reference to `dbresults@4'
spg_sybase.o:spg_sybase.c:(.text+0xf00): undefined reference to `dbnextrow@4'
spg_sybase.o:spg_sybase.c:(.text+0x1159): undefined reference to `dbstrlen@4'
spg_sybase.o:spg_sybase.c:(.text+0x11a9): undefined reference to `dbstrcpy@16'
spg_sybase.o:spg_sybase.c:(.text+0x121f): undefined reference to `dbfcmd@0'
spg_sybase.o:spg_sybase.c:(.text+0x122e): undefined reference to `dbsqlexec@4'
spg_sybase.o:spg_sybase.c:(.text+0x1268): undefined reference to `dbgetuserdata@
4'
spg_sybase.o:spg_sybase.c:(.text+0x12d4): undefined reference to `dbsetuserdata@
8'
spg_sybase.o:spg_sybase.c:(.text+0x130a): undefined reference to `dbgetuserdata@
4'
spg_sybase.o:spg_sybase.c:(.text+0x138f): undefined reference to `dbfcmd@0'
spg_sybase.o:spg_sybase.c:(.text+0x139e): undefined reference to `dbsqlexec@4'
spg_sybase.o:spg_sybase.c:(.text+0x13d4): undefined reference to `dbgetuserdata@
4'
spg_sybase.o:spg_sybase.c:(.text+0x142d): undefined reference to `dbsetuserdata@
8'
spg_sybase.o:spg_sybase.c:(.text+0x148f): undefined reference to `dbfcmd@0'
spg_sybase.o:spg_sybase.c:(.text+0x149e): undefined reference to `dbsqlexec@4'
spg_sybase.o:spg_sybase.c:(.text+0x14d4): undefined reference to `dbgetuserdata@
4'
spg_sybase.o:spg_sybase.c:(.text+0x152d): undefined reference to `dbsetuserdata@
8'
spg_sybase.o:spg_sybase.c:(.text+0x158c): undefined reference to `dbdead@4'
spg_sybase.o:spg_sybase.c:(.text+0x16c2): undefined reference to `dbgetuserdata@
4'
spg_sybase.o:spg_sybase.c:(.text+0x1716): undefined reference to `dbexit@0'
which I can't understand since I *think* (but may be wrong) my .a fil has same references, or have I got something wrong ?
here is what an nm on my generated .a file outputs :
diefs00270.o:
00000000 b .bss
00000000 d .data
00000000 i .idata$4
00000000 i .idata$5
00000000 i .idata$6
00000000 i .idata$7
00000000 t .text
         U __head_libsybdb_a
00000000 I __imp__dbcmd@8
00000000 T _dbcmd@8
diefs00269.o:
00000000 b .bss
00000000 d .data
00000000 i .idata$4
00000000 i .idata$5
00000000 i .idata$6
00000000 i .idata$7
00000000 t .text
         U __head_libsybdb_a
00000000 I __imp__dbclropt@12
00000000 T _dbclropt@12
diefs00268.o:
00000000 b .bss
00000000 d .data
00000000 i .idata$4
00000000 i .idata$5
00000000 i .idata$6
00000000 i .idata$7
00000000 t .text
         U __head_libsybdb_a
00000000 I __imp__dbclrbuf@8
00000000 T _dbclrbuf@8
any idea ?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]