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 ==========
2012/11/23 Alberto <[email protected]>
> Damn.. I spent the whole afternoon trying to create a visualstudio project
> useful for this purpose, but I'm not so able in using VisualStudio 2012, so
> I just wasted time.. I also tried to download VisualStudio 2010 from
> DreamSpark, but it doesn't work ._.
> Thank you very much for your time and you patience, but without someone
> that tells me how to make VisualStudio work I have to do some attempts of
> configuration, and this requires long time..
>
>
> 2012/11/23 Mateusz Loskot <[email protected]>
>
>> On 23 November 2012 09:19, Alberto <[email protected]> wrote:
>> > Hi Mateusz, I attached my logs bug.. this new compilation gives back 62
>> > errors.. and I don't know why..
>>
>> It looks like PostgreSQL client library is not linked correctly.
>> I'd suggest you to try to compile and link this tiny example:
>>
>> #include <libpq-fe.h>
>> int main()
>> {
>> PQconnectdb("");
>> }
>>
>> Either from command line directly or you can create
>> and configure VS project manually.
>> If you manage to build and link it successfully, please send me
>> the command lines you used to execute the cl.exe and link.exe
>> or the VS project file.
>> Then, I may be able to figure out where is the problem.
>>
>> 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
>>
>
>
>
> --
> Alberto
>
--
Alberto
------------------------------------------------------------------------------
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