pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedcannot find odbc library to link to for c program
3+ messages / 2 participants
[nested] [flat]
* cannot find odbc library to link to for c program
@ 2006-03-16 18:34 Doug Stade <stade@codefast.com>
0 siblings, 0 replies; 3+ messages in thread
From: Doug Stade @ 2006-03-16 18:34 UTC (permalink / raw)
To: pgsql-odbc; +Cc: stade@codefast.com
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@4
lcfdb.lib(oconnect.obj) : error LNK2001: unresolved external symbol _SQLFreeHandle@8
lcfdb.lib(oconnect.obj) : error LNK2001: unresolved external symbol _SQLAllocHandle@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.
^ permalink raw reply [nested|flat] 3+ messages in thread
* cannot find odbc library to link to for c program
@ 2006-03-16 18:48 Doug Stade <stade@codefast.com>
0 siblings, 1 reply; 3+ messages in thread
From: Doug Stade @ 2006-03-16 18:48 UTC (permalink / raw)
To: 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
_SQLDisconne[1]ct@4
lcfdb.lib(oconnect.obj) : error LNK2001: unresolved external symbol
_SQLFreeHand[2]le@8
lcfdb.lib(oconnect.obj) : error LNK2001: unresolved external symbol
_SQLAllocHan[3]dle@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.
Thanks
Doug
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: cannot find odbc library to link to for c program
@ 2006-03-22 11:42 Ludek Finstrle <luf@pzkagis.cz>
parent: Doug Stade <stade@codefast.com>
0 siblings, 0 replies; 3+ messages in thread
From: Ludek Finstrle @ 2006-03-22 11:42 UTC (permalink / raw)
To: Doug Stade <stade@codefast.com>; +Cc: pgsql-odbc
> 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
> _SQLDisconne[1]ct@4
> lcfdb.lib(oconnect.obj) : error LNK2001: unresolved external symbol
> _SQLFreeHand[2]le@8
> lcfdb.lib(oconnect.obj) : error LNK2001: unresolved external symbol
> _SQLAllocHan[3]dle@12
> ...
>
> function_tester.exe : fatal error LNK1120: 11 unresolved externals
> NMAKE : fatal error U1077: 'link' : return code '0x460'
> Stop.
This isn't psqlodbc related question. You may search the answer in
Microsoft KB. When you write application using ODBC you work with
ODBC manager not directly with the driver (psqlODBC, MyODBC, ...).
Regards,
Luf
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2006-03-22 11:42 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-03-16 18:34 cannot find odbc library to link to for c program Doug Stade <stade@codefast.com>
2006-03-16 18:48 cannot find odbc library to link to for c program Doug Stade <stade@codefast.com>
2006-03-22 11:42 ` Ludek Finstrle <luf@pzkagis.cz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox