Skip to Content.
Sympa Menu

freetds - [freetds] Newbie question - which lib to link with ?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Brian Ipsen" <Brian.Ipsen AT andebakken.dk>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Newbie question - which lib to link with ?
  • Date: Tue, 26 Nov 2002 19:06:15 +0100

Hi,

I'm a complete newbie on both compiling and linking - and freetds - but I'm
trying to make a simple test program to get a single row from a MS Sql
server.

I use the following command to compile/link:

gcc -O3 -march=i686 -mcpu=i686 -funroll-loops -I/usr/include/openssl -DTDS70
-DMSDBLIB -lz -L/usr/lib test.c

But it gives me (among other):

/tmp/cctIveod.o: In function `main':
/tmp/cctIveod.o(.text+0x1c): undefined reference to `dbinit'
/tmp/cctIveod.o(.text+0x34): undefined reference to `dblogin'
/tmp/cctIveod.o(.text+0x46): undefined reference to `dbsetlname'
/tmp/cctIveod.o(.text+0x86): undefined reference to `tdsdbopen'
/tmp/cctIveod.o(.text+0x95): undefined reference to `dbuse'
/tmp/cctIveod.o(.text+0xa2): undefined reference to `dbcmd'
/tmp/cctIveod.o(.text+0xaa): undefined reference to `dbsqlexec'
/tmp/cctIveod.o(.text+0xb2): undefined reference to `dbresults'
/tmp/cctIveod.o(.text+0xf6): undefined reference to `dbcolname'
/tmp/cctIveod.o(.text+0x112): undefined reference to `dbnumcols'
/tmp/cctIveod.o(.text+0x11e): undefined reference to `dbexit'

>From this it seems logical, that I haven't linked with the dblib stuff from
freetds - but what do I need to add to my command-line ? All libs are
installed in /usr/libs

Regards (and sorry for such a trivial question, but not everyone can start
as an expert),

/Brian






Archive powered by MHonArc 2.6.24.

Top of Page