On 23 November 2012 18:40, Alberto <[email protected]> wrote:
> I chase Empty Project, added a file called main.cpp, pasted you code, added
> library in the settings in this way:
> 1. Project properties > Configuration properties > Linker > Input >
> Additional Dependencies = "C:\dev\PostgreSQL9.2.1\lib\libpq.lib;"
> 2. Project properties > Configuration properties > C/C++ > General >
> Additional Include Directories = "C:\dev\ProstgreSQL9.2.1\include"
>
> But I'm still getting back this error:
>
> 1>------ Rebuild All started: Project: pgStatus, Configuration: Debug Win32
> ------
> 1>  main.cpp
> 1>main.obj : error LNK2019: unresolved external symbol _PQconnectdb
> referenced in function _main
> 1>C:\Users\Alberto\Desktop\pgStatus\Debug\pgStatus.exe : fatal error
> LNK1120: 1 unresolved externals
> ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


Alberto,

This is the same error as in your previous logs, so it does not help
much toHTC One X Contract Deals
diagnose what is the problem.

Is there any chance there is mix up of PostgreSQL 64-bit
and you're building the project as 32-bit?
I have never tested PostgreSQL 64-bit on Windows, so I
didn't encounter that issue, but I looked around and it seems to
a common problem:
http://archives.postgresql.org/pgsql-novice/2011-11/msg00059.php

Please, check these threads here, last post:

http://www.gamedev.net/topic/606242-postgresql-libpq-linking-errors/

Don't forget to add these Windows API libraries to linker input too:
ws2_32.lib
secur32.lib

BTW, here you have walkthrough how to configure VS project for PostgreSQL
http://www.askyb.com/cpp/c-postgresql-example/

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to