-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
编译时报错找不到libpq-fe.h #187
Comments
@Jacyking |
cmake版本低了,最新的pr有解决这个问题,或者直接升级cmake到3.29吧 |
感谢,安装了cmake3.31后确实成功了 |
大佬们,小白又遇到个问题。我在尝试整合进我的项目的时候,把整个项目目录下到了我的 src/utils下,即整个目录路径是 set(ENABLE_PG ON)
add_definitions(-DORMPP_ENABLE_PG)
add_subdirectory(/src/utils/ormpp) 或是 set(ENABLE_PG ON)
add_definitions(-DORMPP_ENABLE_PG)
add_library(ormpp INTERFACE)
include(src/utils/ormpp/cmake/pgsql.cmake)
target_link_libraries(ormpp INTERFACE ${PGSQL_LIBRARY})
target_include_directories(ormpp INTERFACE ormpp src/utils/ormpp/ormpp ${PGSQL_INCLUDE_DIR}) 都不行,因为会报这个错误
但是我把全部东西都挪到项目目录下,按照说明的方法, |
你检查一下路径吧 |
系统: Ubuntu22.04 LTS
按照要求装了libpq-dev,根据说明在
cmake --build build --config DEBUG
的时候报错找不到libpq-fe.h,如下确定已经安装了libpq-dev,查看了libpq-fe.h是在
/usr/include/postgresql
下,又改了CMakeLists.txt加了这一句
之后这里是不报错了,但是出现一大堆连接时找不到的报错
也试过安装整个postgres,还是不行。
The text was updated successfully, but these errors were encountered: