SQLiteCpp icon indicating copy to clipboard operation
SQLiteCpp copied to clipboard

problem with vcpkg

Open Lazox12 opened this issue 11 months ago • 0 comments

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

Lazox12 avatar Jan 19 '25 11:01 Lazox12