Closed LunaticLegacy closed 4 days ago
[Uploading errors.txt…]()
You say “using CMake”, but Figure2 shows that you are using vcpkg with -DCMAKE_TOOLCHAIN_FILE=D:/git/vcpkg/vcpkg-master/scripts/buildsystems/vpkg.cmake
: https://learn.microsoft.com/en-us/vcpkg/users/buildsystems/cmake-integration
Are you saying you installed libpqxx with vcpkg?
If you are using vcpkg, ask your question in microsoft/vcpkg repository. If not, you should not specify -DCMAKE_TOOLCHAIN_FILE=D:/git/vcpkg/vcpkg-master/scripts/buildsystems/vpkg.cmake
should not be specified.
And target_link_libraries(runner PUBLIC pqxx)
should fail because CMakeLists.txt
is missing find_package(libpqxx)
.
I do not know why the error does not occur.
Solved, thx. Then I met another issue: Fig.4 | Cannot generate IntelliSense PCH Because of headerstop location is not in my file
You say “using CMake”, but Figure2 shows that you are using vcpkg with
-DCMAKE_TOOLCHAIN_FILE=D:/git/vcpkg/vcpkg-master/scripts/buildsystems/vpkg.cmake
: https://learn.microsoft.com/en-us/vcpkg/users/buildsystems/cmake-integration Are you saying you installed libpqxx with vcpkg? If you are using vcpkg, ask your question in microsoft/vcpkg repository. If not, you should not specify-DCMAKE_TOOLCHAIN_FILE=D:/git/vcpkg/vcpkg-master/scripts/buildsystems/vpkg.cmake
should not be specified.And
target_link_libraries(runner PUBLIC pqxx)
should fail becauseCMakeLists.txt
is missingfind_package(libpqxx)
. I do not know why the error does not occur.
Fig.1 | A lot of vars and funcs were not the member of pqxx::result
Fig.2 | The last time I used cmake
Fig.3 | The latest progress of generating a solution by VS
Ah I really dunno how to deal with this. I linked all the files related to the source code and most the libs as I can, but I still failed to build the file. p.s. I'm a green hand to cmake and still learning how to use them. p.p.s. Maybe, I think maybe, somebody can read Chinese GUI by the places of buttons.