Skip to Content.
Sympa Menu

freetds - Re: [freetds] Can't compile DB-Lib applications under FreeTDS tree

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • 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, 17 Oct 2007 19:47:58 -0700

Hi,

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...

make[2]: Entering directory
`/cygdrive/h/svn/swdev/buildtools/src/freetds/freetds-0.64/src/apps'
if gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include
-D_FREETDS_LIBRARY_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG=1 -Wall
-Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -g -O2 -MT tsql.o
-MD -MP -MF ".deps/tsql.Tpo" -
c -o tsql.o tsql.c; \
then mv -f ".deps/tsql.Tpo" ".deps/tsql.Po"; else rm -f ".deps/tsql.Tpo";
exit 1
; fi
/bin/sh ../../libtool --tag=CC --mode=link gcc -g -O2 -o tsql.exe tsql.o
../tds/libtds_objects.la ../replacements/libreplacements.la -liconv
-static-libgcc -lncurses -lreadline
mkdir .libs
gcc -g -O2 -o tsql.exe tsql.o -static-libgcc ../tds/.libs/libtds_objects.a
../replacements/.libs/libreplacements.a /usr/lib/libiconv.dll.a
/usr/lib/libncurses.dll.a -L/usr/lib -lreadline
if gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include
-D_FREETDS_LIBRARY_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG=1 -Wall
-Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -g -O2 -MT freebcp.o
-MD -MP -MF ".deps/freebcp.Tpo" -c -o freebcp.o freebcp.c; \
then mv -f ".deps/freebcp.Tpo" ".deps/freebcp.Po"; else rm -f
".deps/freebcp.Tpo"; exit 1; fi
/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/freebcp.c:244:
undefined reference to `_tdsdump_open'
../dblib/.libs/libsybdb.a(bcp.o): In function `bcp_options':
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/dblib/bcp.c:652:
undefined reference to `_tdsdump_log'
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/dblib/bcp.c:620:
undefined reference to `_tdsdump_log'
../dblib/.libs/libsybdb.a(bcp.o): In function `_bcp_check_eof':
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/dblib/bcp.c:1074:
undefined reference to `_tdsdump_log'
../dblib/.libs/libsybdb.a(bcp.o): In function `_bcp_build_bulk_insert_stmt':
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/dblib/bcp.c:2362:
undefined reference to `_tdsdump_log'
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/dblib/bcp.c:2366:
undefined reference to `_tds_quote_id'
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/dblib/bcp.c:2382:
undefined reference to `_tds_quote_id'
../dblib/.libs/libsybdb.a(bcp.o): In function `_bcp_start_copy_in':
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/dblib/bcp.c:2098:
undefined reference to `_tds_submit_query'
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/dblib/bcp.c:2108:
undefined reference to `_tds_process_simple_query'
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/dblib/bcp.c:2200:
undefined reference to `_tds_numeric_bytes_per_prec'
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/dblib/bcp.c:2205:
undefined reference to `_tdsdump_log'
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/dblib/bcp.c:2206:
undefined reference to `_tdsdump_log'
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/dblib/bcp.c:2129:
undefined reference to `_tds_numeric_bytes_per_prec'
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/dblib/bcp.c:2154:
undefined reference to `_tdsdump_log'
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/dblib/bcp.c:2155:
undefined reference to `_tdsdump_log'
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/dblib/bcp.c:2211:
undefined reference to `_tdsdump_log'
../dblib/.libs/libsybdb.a(bcp.o): In function `_bcp_send_colmetadata':
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/dblib/bcp.c:2439:
undefined reference to `_tds_put_byte'
/home/dchang/svn/swdev/buildtools/src/freetds/freetds-0.64/src/dblib/bcp.c:2451:
undefined reference to `_tds_put_smallint'

It goes on like this for a couple hundred lines of undefined references.

The weird thing is that tsql.exe links fine, but it doesn't use libsybdb.a.
Do I need to add another library (other than libsybdb.a and libiconv.dll.a)
to resolve these references (for freebcp.exe)?

What am I doing wrong?

DC




Archive powered by MHonArc 2.6.24.

Top of Page