From: | "Doug Stade" <stade(at)codefast(dot)com> |
---|---|
To: | <pgsql-odbc(at)postgresql(dot)org> |
Cc: | <stade(at)codefast(dot)com> |
Subject: | cannot find odbc library to link to for c program |
Date: | 2006-03-16 18:34:02 |
Message-ID: | 000f01c64928$33614510$41c1a1c6@ampere |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
SUMMARY:
I have written a c program that uses odbc functions, I do not know the name of odbc postgres library I need to link to on windows.
Can someone tell me the name of the library and where I can find it.
DETAILS:
To compile the program on unix I just need to link to lodbc
The final link command on unix (aix433 in this case) looks like this:
% gcc -o function_tester -L/host/f/postgresql-8.1.3/aix433/lib ceargs.o function_tester.o -lodbc -llcfdb -Wl
On windows I get the following error that indicates to me that I need a comparable odbc library to link to on windows.
% link /nologo /warn:3 /NODEFAULTLIB:libcpmt.lib /out:function_tester.exe
*.obj *.res lcfdb.lib "/libpath:d:\host\f\postgresql-8.1.3\lib" "/libpath:D:\Progra~1\Micros~1\VC98\lib"
setargv.obj commode.obj
lcfdb.lib(oconnect.obj) : error LNK2001: unresolved external symbol _SQLDisconnect(at)4
lcfdb.lib(oconnect.obj) : error LNK2001: unresolved external symbol _SQLFreeHandle(at)8
lcfdb.lib(oconnect.obj) : error LNK2001: unresolved external symbol _SQLAllocHandle(at)12
...
function_tester.exe : fatal error LNK1120: 11 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.
Other information:
The installation I am using on windows (and unix) is postgres 8.1.3.
I installed on windows using the postgresql-8.1.msi installer program.
I use nmake and cl from Microsoft visual studio to compile.
From | Date | Subject | |
---|---|---|---|
Next Message | Doug Stade | 2006-03-16 18:48:50 | cannot find odbc library to link to for c program |
Previous Message | Tom Lane | 2006-03-16 16:37:40 | Re: psqlodbc can't coonect PHP |