-
Notifications
You must be signed in to change notification settings - Fork 519
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
(vcpkg) LNK2019: unresolved external symbol
on Windows 11 for Database
std::filesystem::path
constructor
#474
Comments
reviewing this I think the issue is in how vcpkg configures it: vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DSQLITECPP_RUN_CPPLINT=OFF
-DSQLITECPP_RUN_CPPCHECK=OFF
-DSQLITECPP_INTERNAL_SQLITE=OFF
-DSQLITE_ENABLE_COLUMN_METADATA=ON
-DSQLITECPP_USE_STATIC_RUNTIME=OFF # unconditionally off because vcpkg's toolchains already do the right thing
# See https://github.com/SRombauts/SQLiteCpp/blob/e74403264ec7093060f4ed0e84bc9208997c8344/CMakeLists.txt#L40-L46
${USE_STACK_PROTECTION}
) this section should define: |
Adding |
I fixed this in our code by creating an overlay port with "-DCMAKE_CXX_STANDARD=23" passed to vcpkg_cmake_configure. I think sqlitecpp is setting it to C++11 by default if it's not explicitly set in vcpkg. |
Preface
I installed
SQLiteCpp
3.3.1
usingvcpkg
Description
On Windows, the constructor for
Database
that takes astd::filesystem::path
argument is not found by the linker. It does not appear to be present in thevcpkg\installed\x64-windows\lib\SQLiteCpp.lib
(DUMPBIN
output provided below).I tried running this on a Linux machine and it successfully built and ran so it must have something to do with Windows builds specifically.
I tested passing a
std::string
instead of astd::filesystem::path
and that built and ran successfully on Windows 11.Minimal Reproducible Example
main.cpp
CMakeLists.txt
Output
Relevant Output of
DUMPBIN /EXPORTS SQLiteCpp.lib
Windows Build Output
The text was updated successfully, but these errors were encountered: