X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 3CB259DC9A7 for ; Thu, 16 Mar 2006 14:34:07 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 72571-09 for ; Thu, 16 Mar 2006 14:34:06 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 299969DC9E0 for ; Thu, 16 Mar 2006 14:34:04 -0400 (AST) Received: from hub.codefast.com (dsl-main-66-18-225-101-cgy.nucleus.com [66.18.225.101]) by svr4.postgresql.org (Postfix) with ESMTP id B5D615AF940 for ; Thu, 16 Mar 2006 18:34:04 +0000 (GMT) Received: from imail.codefast.com (osborne.codefast.com [198.161.193.49]) by hub.codefast.com (8.12.9/8.12.9) with ESMTP id k2GIXp2E007377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 16 Mar 2006 11:33:51 -0700 (MST) Received: from ampere (ampere.realcase.com [198.161.193.65]) by imail.codefast.com (8.12.9/8.12.9) with SMTP id k2GIY2XU023212; Thu, 16 Mar 2006 11:34:02 -0700 (MST) Message-ID: <000f01c64928$33614510$41c1a1c6@ampere> From: "Doug Stade" To: Cc: Subject: cannot find odbc library to link to for c program Date: Thu, 16 Mar 2006 11:34:02 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000C_01C648ED.869C0A20" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.001 required=5 tests=[AWL=-0.001, HTML_MESSAGE=0.001] X-Spam-Score: 0.001 X-Spam-Level: X-Archive-Number: 200603/76 X-Sequence-Number: 7362 This is a multi-part message in MIME format. ------=_NextPart_000_000C_01C648ED.869C0A20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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. ------=_NextPart_000_000C_01C648ED.869C0A20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
SUMMARY:
I have written a c program that uses = odbc=20 functions, I do not know the name of odbc postgres library I need to = link to on=20 windows.
 
Can someone tell me the name of the = library and=20 where I can find it.
 
DETAILS:
To compile the program on unix I just = need to link=20 to lodbc
 
The final link command on unix (aix433 = in this=20 case) looks like this:
% gcc -o function_tester=20 -L/host/f/postgresql-8.1.3/aix433/lib  ceargs.o=20 function_tester.o  -lodbc -llcfdb -Wl
 
On windows I get the = following error that=20 indicates to me that I need a comparable odbc library to link to on=20 windows.
 
 % link /nologo /warn:3=20 /NODEFAULTLIB:libcpmt.lib /out:function_tester.exe
*.obj *.res =20 lcfdb.lib   "/libpath:d:\host\f\postgresql-8.1.3\lib" =20 "/libpath:D:\Progra~1\Micros~1\VC98\lib"
 setargv.obj = commode.obj
lcfdb.lib(oconnect.obj) : error = LNK2001: unresolved=20 external symbol _SQLDisconnect@4
lcfdb.lib(oconnect.obj) : = error=20 LNK2001: unresolved external symbol _SQLFreeHandle@8
lcfdb.lib(oconnect.obj) : = error=20 LNK2001: unresolved external symbol _SQLAllocHandle@12
...
function_tester.exe : fatal error = LNK1120: 11=20 unresolved externals
NMAKE : fatal error U1077: 'link' : return code=20 '0x460'
Stop.
 
 
Other information:
The installation I am using on windows = (and unix)=20 is postgres 8.1.3.
I installed on windows using the = postgresql-8.1.msi=20 installer program.
 
I use nmake and cl from Microsoft = visual studio to=20 compile.
------=_NextPart_000_000C_01C648ED.869C0A20--