libpqxx: win32 link ws2_32 dont work
from src/CMakeLists.txt line30
if(WIN32)
target_link_libraries(${tgt} PUBLIC wsock32 ws2_32)
endif()
it didn’t work on ws2_32 it has to be added manually in project CMakeLists.txt
target_link_libraries(test pqxx libpq Ws2_32)
better to check it
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Comments: 17 (11 by maintainers)
the whole things done I got it
First thing first
We need to set CMAKE_PREFIX_PATH or CMAKE_MODULE_PATH Manually in order to find The Package
make sure the
libpqxx-config.cmakeexists in the pathSecond since it’s called
libpqxx::pqxxin thelibpqxx-config.cmakeit has to belibpqxx::pqxxwhen it comes to target_link_libraries And done,no more dependencies errorRecommend to add these in the first step of example