Skip to content
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

problem with vcpkg #498

Open
Lazox12 opened this issue Jan 19, 2025 · 0 comments
Open

problem with vcpkg #498

Lazox12 opened this issue Jan 19, 2025 · 0 comments

Comments

@Lazox12
Copy link

Lazox12 commented Jan 19, 2025

I get this error when importing sqlitecpp using vcpkg:

undefined reference to SQLite::Statement::Statement(SQLite::Database const&, char const*)
undefined reference to `SQLite::Statement::executeStep()'
undefined reference to `SQLite::Database::getErrorMsg() const'

and like 20 of similar errors for every usage of sqlite cpp in my code

CMakeLists.txt:

cmake_minimum_required(VERSION 3.8)
project(pageant_keyLoader)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(SQLITECPP_RUN_CPPCHECK OFF CACHE BOOL "" FORCE)
set(SQLITECPP_RUN_CPPLINT OFF CACHE BOOL "" FORCE)

find_package(OpenSSL REQUIRED)
find_package(unofficial-argon2 CONFIG REQUIRED)
find_package(SQLiteCpp REQUIRED)


add_executable(pageant_keyLoader main.cpp)


target_link_libraries(pageant_keyLoader  OpenSSL::SSL)
target_link_libraries(pageant_keyLoader  OpenSSL::Crypto)
target_link_libraries(pageant_keyLoader  unofficial::argon2::libargon2)
target_link_libraries(pageant_keyLoader SQLiteCpp)

if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
    target_link_libraries(pageant_keyLoader -static)
endif()

vcpkg.json:

{
  "dependencies": [
    "openssl",
    "sqlitecpp",
    "argon2"
  ]
}

this is how I include it in main.cpp:#include <SQLiteCpp/SQLiteCpp.h>

thanks for any help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant