编译PostgreSQL的的libpqxx C ++库时不能找到的libpq-fe.h

问题描述 投票:0回答:1

我试图安装libpqxx库使用C ++来连接到postgresDB我使用MSYS和MINGW32。当我在MSYS控制台上运行./configure我得到这个消息(见下文)的控制台上。当我在pg_config --includedir目录检查,我可以看到头文件libpq-fe.h就是在那里,我不能做正确的事情。我在Windows平台上我已经安装的Postgres V.10的libpqxx版本为4.0也PATH环境我没设置它像这样的出口PATH="$PATH:/c/Program Files/PostgreSQL/10/bin"

checking for pg_config... /c/Program Files/PostgreSQL/10/bin/pg_config
./configure: line 15928: /c/Program: No such file or directory
configure: using PostgreSQL headers at
./configure: line 15931: /c/Program: No such file or directory
configure: using PostgreSQL libraries at
checking for ANSI C header files... (cached) yes
checking ability to compile programs using the standard C library... yes
checking for library containing select... no
checking for main in -lws2_32... yes
checking /libpq-fe.h usability... no
checking /libpq-fe.h presence... no
checking for /libpq-fe.h... no
configure: error:
Can't find libpq-fe.h in .  Are you sure the libpq
    headers are installed correctly?  They should be in the directory returned by
    "pg_config --includedir".
c++ postgresql libpqxx
1个回答
0
投票

我想通了计划中的问题,在环境中的PATH varibale间距所以不是安装Postgres的文件的文件夹,我创建另一个文件夹在其名称中没有空格,所以我的出口是这样的PATH="$PATH:/c/MyPostgreSQLFOLDER/PostgreSQL/10/bin"你能说出任何你想要的文件夹只是不包括名称中的任何空间。希望这可以帮助那里的人。

© www.soinside.com 2019 - 2024. All rights reserved.