[freetds] Undefined references to all database functions

panssarikomppania at gmail.com panssarikomppania at gmail.com
Wed May 21 11:02:42 EDT 2008


I'm currently coding some software that uses Microsoft SQL as it's database.
The language used is C. The coding itself wasn't a problem at all, but I get
numerous errors when compiling the code. And as this new place where I work
has a strict OS policy, I'm forced to use a Windows machine and an IDE
called Dev-C++. The boss didn't want to make any exceptions like bringing my
own Linux coding laptop where everything works just fine. I somewhat managed
to install FreeTDS on this machine, but the compiling process doesn't go
well at all. I get a total of 71 errors, below are some examples.

main.c: Undefined reference to 'dbinit'.
main.c: Undefined reference to 'dblogin'.
main.c: Undefined reference to 'dbsetluser'.
main.c: Undefined reference to 'dbsetlpwd'.
main.c: Undefined reference to 'dbfcmd'.
main.c: Undefined reference to 'dbsqlexec'.

I think this is a linker problem. I checked that I have included all
necessary header files (sybfront.h and sybdb.h) and that they are where they
should be (C:\path\to\dev-cpp\include\). The linker also knows that it
should link -lsybdb. So what could be wrong? Am I missing some other header
files? Am I missing some libraries? Is the compiler/linker that Dev-C++ uses
just rubbish? Or is this Windows' fault? If I knew what logs or other
informative pieces of text I could include here to make this easier for you,
I'd do it. If only I'd know where to find everything important in this
unlogical directory structure.

Thanks in advance for your time.



More information about the FreeTDS mailing list