Windows 7 x64 で VS 2012 を使用しています。私の友人は、libpq を使用する C++ クラスを書いてくれました。
...
#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);
}
...
プロジェクトをビルドしようとするたびに LNK2019 エラーが発生します。スクリーンショットPostgresをインストールして、プロジェクト プロパティへのパスをいくつかロードし ました。