freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Can't compile DB-Lib applications under FreeTDS tree
- From: "David Chang" <dchang AT fsautomation.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Can't compile DB-Lib applications under FreeTDS tree
- Date: Wed, 24 Oct 2007 13:30:09 -0700
James and entropy,
It turns out that I had the Windows path before the CYGWIN path and there was a conflict with the 'find' command. Because of that, the configure script couldn't do its job correctly. When I put the CYGWIN path before the Windows path, everything compiled correctly.
By the way, the SQL Server DB-Library function dbfreelogin() is not available in FreeTDS. Can you put this macro
#define dbfreelogin(x) dbloginfree((x))
into sqldb.h or sybdb.h.
Thanks,
DC
----- Original Message ----- From: "James K. Lowden" <jklowden AT freetds.org>
To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
Sent: Thursday, October 18, 2007 7:09 AM
Subject: Re: [freetds] Can't compile DB-Lib applications under FreeTDS tree
David Chang wrote:
I'm trying to build FreeTDS under Cygwin. It seems to build the library...
(libsybdb.a) correctly, but when it tries to link, there are several
missing references. I simply downloaded 0.64 and ran the following:
./configure --enable-extra-checks --prefix=/home/dchang/freetds_0.64
make
Here's the output of the faulty linking...
/bin/sh ../../libtool --tag=CC --mode=link gcc -g -O2 -o freebcp.exe
freebcp.o ../dblib/libsybdb.la gcc -g -O2 -o freebcp.exe freebcp.o
../dblib/.libs/libsybdb.a /usr/lib/libiconv.dll.a freebcp.o: In function
`process_parameters':
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/apps/fre
ebcp.c:244: undefined reference to `_tdsdump_open'
It looks like libsybdb.a is not built correctly. It should include
tdsdump_open et al.
$ nm src/dblib/.libs/libsybdb.a \
| sed -Ene '/tdsdump_open|o:$/p' \
| grep -C1 tdsdump_open
login.o:
U tdsdump_open
read.o:
--
config.o:
U tdsdump_open
query.o:
--
log.o:
00000054 T tdsdump_open
^^^ object code present
What does your log show for the command that produced libsybdb.a?
The weird thing is that tsql.exe links fine
libsybdb is the db-lib library, which freebcp uses. tsql is really
intended to test the libtds layer. It doesn't need that library because
it doesn't use db-lib.
Each client library includes any functions it needs from the src/tds part
of the tree. Most applications use a client library and get any such
functions that way. tsql instead links to them directly.
HTH. It's hard to describe clearly.
--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
-
Re: [freetds] Can't compile DB-Lib applications under FreeTDS tree,
David Chang, 10/17/2007
-
Re: [freetds] Can't compile DB-Lib applications under FreeTDS tree,
James K. Lowden, 10/18/2007
- Re: [freetds] Can't compile DB-Lib applications under FreeTDS tree, David Chang, 10/24/2007
- Re: [freetds] Can't compile DB-Lib applications under FreeTDS tree, entropy, 10/19/2007
-
Re: [freetds] Can't compile DB-Lib applications under FreeTDS tree,
James K. Lowden, 10/18/2007
Archive powered by MHonArc 2.6.24.