Reputation: 13
I am trying to develop a database app using PostgreSQL with VS2022 in C++. I have successfully installed Postgres 16.1-1 software and a data directory in my Documents directory. I unzipped libpqxx-7.8.1 but don't see libraries so I am now trying to create a VS Solution (.SLN) using CMake to do that. It had trouble finding pkg-config.exe but I solved that by referencing Thomas Weller's 8 step process at How to install pkg config in windows? to get that working. I seem to have at least 2 problems remaining that prevent me from generating the .SLN file. Using a Windows 11 CMD window, I navigate to Documents/libpqxx-7.8.1/ and execute "cmake ." Then,--
CMake reports "Could NOT find PostgreSQL (missing: PostgreSQL_INCLUDE_DIR). That include subdirectory is there under the Program Files\PostgreSQL directory. I don't have any idea how to help it find all of the PostgreSQL installation. Do I need to edit something?
After successfully finding pkg-config.exe (v 0.26), the module 'libpq' was not found. CMake reports-- C:/Program Files/CMake/share/cmake-3.26/Modules/FindPkgConfig.cmake:829 (_pkg_check_modules_internal) cmake/config.cmake:35 (pkg_check_modules) CMakeLists.txt:27 (include) Do I need to edit something? or download something?
I notice there are two CMakeLists.txt files in the tree. One in the libpqxx-7.8.1 (root) directory and one in its src subdirectory. Am I correct in using the one in the root?
Upvotes: 0
Views: 547