Hi,

Code I using:
Code:
#include <iostream>
#include <string>
#include <pqxx/pqxx>

using namespace std;


int main(){
	try
	{
		pqxx::connection c ("user=postgres password=postgres dbname=myDB hostaddr=192.168.1.121 port=5432");


	}
	catch(exception e)
	{
		
	}
}
Error Generated:

Code:
1>------ Build started: Project: db64practice, Configuration: Release x64 ------
1>dbConnect.obj : error LNK2001: unresolved external symbol "public: virtual struct pg_conn * __cdecl pqxx::connect_direct::do_startconnect(struct pg_conn *)" (?do_startconnect@connect_direct@pqxx@@UEAAPEAUpg_conn@@PEAU3@@Z)
1>dbConnect.obj : error LNK2001: unresolved external symbol "protected: void __cdecl pqxx::connection_base::close(void)" (?close@connection_base@pqxx@@IEAAXXZ)
1>dbConnect.obj : error LNK2001: unresolved external symbol "protected: void __cdecl pqxx::connection_base::init(void)" (?init@connection_base@pqxx@@IEAAXXZ)
1>dbConnect.obj : error LNK2001: unresolved external symbol "protected: __cdecl pqxx::connection_base::connection_base(class pqxx::connectionpolicy &)" (??0connection_base@pqxx@@IEAA@AEAVconnectionpolicy@1@@Z)
1>dbConnect.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl pqxx::connectionpolicy::is_ready(struct pg_conn *)const " (?is_ready@connectionpolicy@pqxx@@UEBA_NPEAUpg_conn@@@Z)
1>dbConnect.obj : error LNK2001: unresolved external symbol "public: virtual struct pg_conn * __cdecl pqxx::connectionpolicy::do_disconnect(struct pg_conn *)" (?do_disconnect@connectionpolicy@pqxx@@UEAAPEAUpg_conn@@PEAU3@@Z)
1>dbConnect.obj : error LNK2001: unresolved external symbol "public: virtual struct pg_conn * __cdecl pqxx::connectionpolicy::do_dropconnect(struct pg_conn *)" (?do_dropconnect@connectionpolicy@pqxx@@UEAAPEAUpg_conn@@PEAU3@@Z)
1>dbConnect.obj : error LNK2001: unresolved external symbol "public: virtual struct pg_conn * __cdecl pqxx::connectionpolicy::do_completeconnect(struct pg_conn *)" (?do_completeconnect@connectionpolicy@pqxx@@UEAAPEAUpg_conn@@PEAU3@@Z)
1>dbConnect.obj : error LNK2001: unresolved external symbol "public: virtual __cdecl pqxx::connectionpolicy::~connectionpolicy(void)" (??1connectionpolicy@pqxx@@UEAA@XZ)
1>dbConnect.obj : error LNK2001: unresolved external symbol "public: __cdecl pqxx::connectionpolicy::connectionpolicy(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0connectionpolicy@pqxx@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>dbConnect.obj : error LNK2001: unresolved external symbol "public: virtual __cdecl pqxx::errorhandler::~errorhandler(void)" (??1errorhandler@pqxx@@UEAA@XZ)
1>dbConnect.obj : error LNK2001: unresolved external symbol "public: __cdecl pqxx::errorhandler::errorhandler(class pqxx::connection_base &)" (??0errorhandler@pqxx@@QEAA@AEAVconnection_base@1@@Z)
1>f:\visual studio 2010\Projects\db64practice\x64\Release\db64practice.exe : fatal error LNK1120: 12 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Visual Studio Configurations:
Code:
<Release>
C/C++ -> General: G:\libpqxx-4.0\include\pqxx
                  G:\libpqxx-4.0\config\sample-headers\compiler\VisualStudio2010\pqxx

LINKER -> General: G:\libpqxx-4.0\lib
                   C:|\PostgreSQL\9.1\lib

LINKER -> General -> input -> Additional Dependacies: libpqxx.lib
                                                      libpqxx_static.lib
                                                      libpq.lib
----------------------------------------------------------------------------------------
<Debug>
C/C++ -> General: G:\libpqxx-4.0\include\pqxx
                  G:\libpqxx-4.0\config\sample-headers\compiler\VisualStudio2010\pqxx

LINKER -> General: G:\libpqxx-4.0\lib
                   C:|\PostgreSQL\9.1\lib

LINKER -> General -> input -> Additional Dependacies: libpqxxD.lib
I copied the pqxx folder into the VS include folder.
I copied some of the lib files into the project folder's release and debug folders

Also, I installed postgresql for 32bit and 64bit OS. The visual studio version is 32bit. I tried to connect to both versions of postgresql, same error

Any suggestions would be appreciated, thanks