0

I'm using a VS 2012 with Windows 7 x64. My friend wrote for me C++ class which is using libpq:

...
#include <libpq-fe.h>
const char* QStrToCStr(QString qstring);
void ShowInfoBox(QString string);
QString IToQS(int x);
QString DToQS(double x);

class BinderHandler
{
private:
    PGresult* DBResultPointer;
    PGconn* DBConnPointer;
...
}
void BinderHandler::DBConnect()
{
    DBConnPointer = PQsetdbLogin(this->pghost,this->pgport,
                                 this->pgoptions,this->pgtty,
                                 this->dbName,this->login,this->pwd);
}
...

I'm getting LNK2019 error each time when I try to build project. screenshot I have postgres installed and I loaded some paths to project properties: screenshot I'm hoping that you can give me a quick guide how make his code work which my project.

  • Please include the relevant information in the screenshot with your post. Or include the screenshot themselves into your post. [How to post images](http://stackoverflow.com/editing-help#images) – JG in SD May 31 '13 at 22:18

1 Answers1

1

You have to explicitly specify the additional lib, libpq.lib, in Linker - Input to be linked, rather than provide the library path only.

bigonez
  • 111
  • 2