在VS 2012项目中使用libpq (PostgreSQL)库
Using libpq (PostgreSQL) library in VS 2012 project
我使用的是Windows 7 x64的VS 2012。我的朋友为我写了一个c++类,使用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);
}
...
每次当我尝试构建项目时,我都会得到LNK2019错误。我已经安装了postgres,我加载了一些路径到项目属性我希望你能给我一个快速的指导,如何使他的代码工作,我的项目。
您必须显式指定额外的库libpq。
相关文章:
- POCO::PostgreSQL:如何将std::vector支持添加到`Binder::bind`
- 使用 pqxx 将 std::vector 存储在 postgresql 中,并从数据库中检索它
- 在PostgreSQL中根据它们的ID选择大量行的最快方法是什么?
- 通过libpqxx提高PostgreSQL数据库的更新速度
- PostgreSQL C++ libpq 编码 UTF-8 问题
- PostgreSQL 将数组或记录作为行返回
- 在 PostgreSQL C 扩展中包含头文件
- 使用二进制数据更新 PostgreSQL 表
- 在PostgreSQL函数或过程中使用C++代码
- 使用准备好的语句大容量插入到postgresql
- 使用 redis 进行日志缓存:是否可以创建逐出到 PostgreSQL 的逐出策略?
- PostgreSQL & CMakeLists - Undefined symbol [...] _my_sock_read in libpq.a(fe-secure-openssl.o)
- 使用libpq组织PostgreSQL数据库连接参数
- CMake add library libpq (postgreSQL) mac c++ clion
- 在为 postgresql 编译 libpqxx C++ 库时找不到 libpq-fe.h
- 简单的Postgresql libpq代码太慢了
- 在PostgreSQL中使用libpq从远程计算机插入二进制大对象(BLOB)
- 在VS 2012项目中使用libpq (PostgreSQL)库
- PostgreSQL C API (libpq)允许你使用结果而不是存储它吗?
- 没有libpq++和SQLAPI++的C++和Postgresql