libpqxx binaries for vs2010 (MFC C++ app)

Hi Experts,
I'd like to get my hands on a project that can give me the .h, .lib and dlls for libpqxx that I can use in Visual C++ for MFC apps or win32 apps with VS2010.  I'm having a tough time finding something straightforward to get this done.  Can anyone help?

Thank you very much!
Mike
LVL 1
threadyAsked:
Who is Participating?
 
jkrCommented:
Apparently there are pre-built binaries for Windows according to http://pqxx.org/development/libpqxx/wiki/FaqGeneral - "Alternatively, libpqxx comes with pre-built configuration headers and Makefiles for use with Visual C++. See win32/INSTALL.txt for instructions. ". Read on at http://pqxx.org/development/libpqxx/browser/trunk/win32/INSTALL.txt#latest

Yet someone else is working on that project for Windows and provides the project files for VC++: http://www.kirit.com/Blog:/2008-07-20/libpqxx-win32%20r32368 "The simplest way to get libraries to use is to open the solution and simply build it."

The PostgreSQL binaries are available from http://www.postgresql.org/download/windows
0
 
threadyAuthor Commented:
argh... Getting unresolved external symbols...

1>Link:
1>     Creating library C:\libpqxx-3.1\libpqxx-win32\win32\msvc8\Release\pqxx.lib and object C:\libpqxx-3.1\libpqxx-win32\win32\msvc8\Release\pqxx.exp
1>binarystring.obj : error LNK2001: unresolved external symbol _PQescapeBytea
1>binarystring.obj : error LNK2001: unresolved external symbol _PQunescapeBytea
1>connection.obj : error LNK2001: unresolved external symbol _PQconnectdb
1>connection.obj : error LNK2001: unresolved external symbol _PQstatus
1>connection.obj : error LNK2001: unresolved external symbol _PQfinish
1>connection.obj : error LNK2001: unresolved external symbol _PQerrorMessage
1>connection.obj : error LNK2001: unresolved external symbol _PQconnectStart
1>connection.obj : error LNK2001: unresolved external symbol _PQconnectPoll
1>connection_base.obj : error LNK2001: unresolved external symbol _PQport
1>connection_base.obj : error LNK2001: unresolved external symbol _PQtrace
1>connection_base.obj : error LNK2001: unresolved external symbol _PQexec
1>connection_base.obj : error LNK2001: unresolved external symbol _PQuser
1>connection_base.obj : error LNK2001: unresolved external symbol _PQsocket
1>connection_base.obj : error LNK2001: unresolved external symbol _PQendcopy
1>connection_base.obj : error LNK2001: unresolved external symbol _PQreset
1>connection_base.obj : error LNK2001: unresolved external symbol _PQnotifies
1>connection_base.obj : error LNK2001: unresolved external symbol _PQhost
1>connection_base.obj : error LNK2001: unresolved external symbol _PQserverVersion
1>connection_base.obj : error LNK2001: unresolved external symbol _PQgetResult
1>connection_base.obj : error LNK2001: unresolved external symbol _PQputCopyEnd
1>connection_base.obj : error LNK2001: unresolved external symbol _PQbackendPID
1>connection_base.obj : error LNK2001: unresolved external symbol _PQprepare
1>connection_base.obj : error LNK2001: unresolved external symbol _PQdb
1>connection_base.obj : error LNK2001: unresolved external symbol _PQisBusy
1>connection_base.obj : error LNK2001: unresolved external symbol _PQexecPrepared
1>connection_base.obj : error LNK2001: unresolved external symbol _PQgetCopyData
1>connection_base.obj : error LNK2001: unresolved external symbol _PQsetNoticeProcessor
1>connection_base.obj : error LNK2001: unresolved external symbol _PQuntrace
1>connection_base.obj : error LNK2001: unresolved external symbol _PQprotocolVersion
1>connection_base.obj : error LNK2001: unresolved external symbol _PQputCopyData
1>connection_base.obj : error LNK2001: unresolved external symbol _PQsendQuery
1>connection_base.obj : error LNK2001: unresolved external symbol _PQmakeEmptyPGresult
1>connection_base.obj : error LNK2001: unresolved external symbol _PQconsumeInput
1>largeobject.obj : error LNK2001: unresolved external symbol _lo_close
1>largeobject.obj : error LNK2001: unresolved external symbol _lo_lseek
1>largeobject.obj : error LNK2001: unresolved external symbol _lo_import
1>largeobject.obj : error LNK2001: unresolved external symbol _lo_write
1>largeobject.obj : error LNK2001: unresolved external symbol _lo_unlink
1>largeobject.obj : error LNK2001: unresolved external symbol _lo_open
1>largeobject.obj : error LNK2001: unresolved external symbol _lo_export
1>largeobject.obj : error LNK2001: unresolved external symbol _lo_creat
1>largeobject.obj : error LNK2001: unresolved external symbol _lo_read
1>result.obj : error LNK2001: unresolved external symbol _PQresultErrorMessage
1>result.obj : error LNK2001: unresolved external symbol _PQoidValue
1>result.obj : error LNK2001: unresolved external symbol _PQftable
1>result.obj : error LNK2001: unresolved external symbol _PQresultErrorField
1>result.obj : error LNK2001: unresolved external symbol _PQclear
1>result.obj : error LNK2001: unresolved external symbol _PQfnumber
1>result.obj : error LNK2001: unresolved external symbol _PQcmdStatus
1>result.obj : error LNK2001: unresolved external symbol _PQfname
1>result.obj : error LNK2001: unresolved external symbol _PQntuples
1>result.obj : error LNK2001: unresolved external symbol _PQresultStatus
1>result.obj : error LNK2001: unresolved external symbol _PQgetvalue
1>result.obj : error LNK2001: unresolved external symbol _PQftablecol
1>result.obj : error LNK2001: unresolved external symbol _PQcmdTuples
1>result.obj : error LNK2001: unresolved external symbol _PQgetlength
1>result.obj : error LNK2001: unresolved external symbol _PQftype
1>result.obj : error LNK2001: unresolved external symbol _PQnfields
1>result.obj : error LNK2001: unresolved external symbol _PQgetisnull
1>util.obj : error LNK2001: unresolved external symbol _PQfreemem
1>util.obj : error LNK2001: unresolved external symbol _PQescapeString
1>C:\libpqxx-3.1\libpqxx-win32\win32\msvc8\\Release\pqxx.dll : fatal error LNK1120: 61 unresolved externals
1>
1>Build FAILED.
0
 
threadyAuthor Commented:
I'm pretty sure these functions are present in libpq.lib and I am linking to them....
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
jkrCommented:
Sorry, don't have a way to test that at the moment :-(
0
 
threadyAuthor Commented:
no prob jkr, thanks anyway
0
 
KurikaesuCommented:
I seem to be having the same issue. I'm attempting to compile Qt with the QPSQL7 driver for postgres and I'm getting unresolved external symbols to things that exist in the libpq.lib.

I've attached a screenshot to show

unresolved.png
0
 
xeltekCommented:
HI,
Apparently, you need libpq.lib to be linked.
LibPQ.lib can be found at the PostgreSQL installation.
It is located default at C:\Program Files\PostgreSQL\9.1\lib.
Add this path to VC library search pathes. and add " #pragma comment(lib, "libpq.lib") " to header file. The library will be linked automatically.

Xeltek
0
 
jkrCommented:
Um, so you ended up using what I suggested?
0
 
threadyAuthor Commented:
I couldn`t get any of that to work jkr, but now I`m onto other stuff, not sure when I`ll be able to revisit what you suggested.  I`m sure that with enough effort I would have got it with your suggestions....
0
 
threadyAuthor Commented:
thanks gentlemen!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.