delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/10/02/05:22:32

X-Spam-Check-By: sourceware.org
Message-ID: <20061002092209.90418.qmail@web26608.mail.ukl.yahoo.com>
Date: Mon, 2 Oct 2006 09:22:09 +0000 (GMT)
From: Benh LIEU SONG <blieusong AT yahoo DOT fr>
Reply-To: Benh LIEU SONG <blieusong AT yahoo DOT fr>
Subject: problem when linking against Sybase dll with cygwin
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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 AT 20'
spg_sybase.o:spg_sybase.c:(.text+0xaa8): undefined reference to `dbbind AT 20'
spg_sybase.o:spg_sybase.c:(.text+0xb00): undefined reference to `dbbind AT 20'
spg_sybase.o:spg_sybase.c:(.text+0xb58): undefined reference to `dbbind AT 20'
spg_sybase.o:spg_sybase.c:(.text+0xbb0): undefined reference to `dbbind AT 20'
spg_sybase.o:spg_sybase.c:(.text+0xc68): more undefined references to `dbbind AT 20
' follow
spg_sybase.o:spg_sybase.c:(.text+0xdf4): undefined reference to `dbfcmd AT 0'
spg_sybase.o:spg_sybase.c:(.text+0xe08): undefined reference to `dbfcmd AT 0'
spg_sybase.o:spg_sybase.c:(.text+0xe20): undefined reference to `dbfcmd AT 0'
spg_sybase.o:spg_sybase.c:(.text+0xe34): undefined reference to `dbfcmd AT 0'
spg_sybase.o:spg_sybase.c:(.text+0xe43): undefined reference to `dbsqlexec AT 4'
spg_sybase.o:spg_sybase.c:(.text+0xe90): undefined reference to `dbresults AT 4'
spg_sybase.o:spg_sybase.c:(.text+0xf00): undefined reference to `dbnextrow AT 4'
spg_sybase.o:spg_sybase.c:(.text+0x1159): undefined reference to `dbstrlen AT 4'
spg_sybase.o:spg_sybase.c:(.text+0x11a9): undefined reference to `dbstrcpy AT 16'
spg_sybase.o:spg_sybase.c:(.text+0x121f): undefined reference to `dbfcmd AT 0'
spg_sybase.o:spg_sybase.c:(.text+0x122e): undefined reference to `dbsqlexec AT 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 AT 0'
spg_sybase.o:spg_sybase.c:(.text+0x139e): undefined reference to `dbsqlexec AT 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 AT 0'
spg_sybase.o:spg_sybase.c:(.text+0x149e): undefined reference to `dbsqlexec AT 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 AT 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 AT 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 AT 8
00000000 T _dbcmd AT 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 AT 12
00000000 T _dbclropt AT 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 AT 8
00000000 T _dbclrbuf AT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019