[freetds] Undefined references to all database functions
James K. Lowden
jklowden at freetds.org
Thu May 22 07:48:35 EDT 2008
panssarikomppania at gmail.com wrote:
> > You want to use the GNU binutils to see what's what, and look closely
> > at the command line (I assume is) generated by Dev-C++. Make sure 1)
> > it's compiling as C, not C++, and 2) that libsybdb is really being
> > linked in.
> I checked it out, everything is compiled as C, not C++. I also took a
> look at the Dev-C++ command line, the whole thing is below.
> Compiler: Default compiler
> Building Makefile: "C:\path\to\project\Makefile.win"
> Executing make clean
> rm -f ../project/main.o ../project/project_private.res project.exe
> gcc.exe main.c -o ../project/main.o -I"C:\path\to\Dev-cpp\include" -i
> project_private.rc --input-format=rc -o ../project/project_private.res
> -0 coff --include-dir C:\path\to\Dev-cpp\lib" -lsybdb
> gcc.exe ../project/project.o ../project/project_private.res
> "project.exe" -L"C:\path\to\Dev-cpp\lib" -lsybdb
> main.c: Undefined reference to 'dbinit'.
> main.c: Undefined reference to 'dblogin'.
As I said, you have a linker question, not a FreeTDS question. I don't
have any experience with MinGW.
More information about the FreeTDS