在为 postgresql 编译 libpqxx C++ 库时找不到 libpq-fe.h
Cant find libpq-fe.h when compiling the libpqxx C++ library for postgresql
我试图安装 libpqxx 库以使用 C++ 连接到 postgresDB am 使用 Msys 和 Mingw32。当我在 msys 控制台上运行./configure
时,我在控制台上收到此消息(如下)。当我签入pg_config --includedir
目录时,我可以看到头文件libpq-fe.h在那里,我在哪里做错了什么。我在Windows平台上,我已经安装了postgres v.10,libpqxx版本是4.0,也是我确实设置的路径环境,因此导出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".
我发现了问题所在,它是环境 PATH 变量中的间距,所以我没有在程序文件文件夹中安装 postgres,而是创建了另一个名称中没有空格的文件夹,所以我的导出是这样的PATH="$PATH:/c/MyPostgreSQLFOLDER/PostgreSQL/10/bin"
您可以随意命名文件夹,只是名称中不包含任何空格。希望这对那里的任何人都有帮助。
相关文章:
- std::map<struct,struct>::find 找不到匹配项,但是如果我循环通过 begin() 到 end(),我在那里看到匹配项
- 找不到成员对象:没有名为get_event()的成员,也处理多态性和向量
- 为什么野牛仍在使用"int yylex(void)",却找不到"int yylex(YYS
- C++ Windows 驱动程序MSB3030无法复制该文件,因为它找不到
- 奇怪的(对我来说)返回声明 - 在谷歌上找不到任何关于它的信息
- 找不到QtResource文件中的文件
- VC++本机单元测试,找不到调试符号
- RegGetValue在当前用户下找不到名称
- 带有 -stdlib=libc++ 的 clang++ 9.0.1 找不到<optional>
- c++找不到具有相同哈希的无序集合元素
- 找不到以下加速库:boost_fiber
- 找不到 FLTK(缺少:FLTK_INCLUDE_DIR)
- 设置 Visual Studio for MPI: 找不到标识符错误
- "assimp/config.h"找不到,但它在文件夹中
- 链接器找不到在虚拟类 c++ 中访问的静态字段的符号
- C++系统找不到指定的文件错误
- FindPackageHandleStandardArgs.cmake:137 的 CMake 错误(消息):找不到 Boost (缺少:正则表达式)(找到合适的版本"1.72.0",
- vcpkg 添加新库,但找不到
- 在为 postgresql 编译 libpqxx C++ 库时找不到 libpq-fe.h
- 致命错误:找不到'libpq++'文件