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 C10B39DCC2D for ; Thu, 16 Mar 2006 14:48:53 -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 78358-09 for ; Thu, 16 Mar 2006 14:48:53 -0400 (AST) X-Greylist: delayed 00:14:48.82068 by SQLgrey- Received: from hub.codefast.com (dsl-main-66-18-225-101-cgy.nucleus.com [66.18.225.101]) by postgresql.org (Postfix) with ESMTP id 747BA9DCC0D for ; Thu, 16 Mar 2006 14:48:51 -0400 (AST) 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 k2GIme2E030685 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 16 Mar 2006 11:48:40 -0700 (MST) Received: from osborne.codefast.com (stade@localhost.codefast.com [127.0.0.1]) by imail.codefast.com (8.12.9/8.12.9) with ESMTP id k2GImpXU024587 for ; Thu, 16 Mar 2006 11:48:51 -0700 (MST) Received: (from stade@localhost) by osborne.codefast.com (8.12.9/8.12.9/Submit) id k2GImo9o002504 for pgsql-odbc@postgresql.org; Thu, 16 Mar 2006 11:48:50 -0700 (MST) Date: Thu, 16 Mar 2006 11:48:50 -0700 From: Doug Stade To: pgsql-odbc@postgresql.org Subject: cannot find odbc library to link to for c program Message-ID: <20060316184850.GD2378@codefast.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.08 required=5 tests=[AWL=0.080] X-Spam-Score: 0.08 X-Spam-Level: X-Archive-Number: 200603/77 X-Sequence-Number: 7363 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