SQLiteCpp
SQLiteCpp copied to clipboard
LNK2001: unresolved external symbol "SQLite::OPEN_READONLY"
Environmnet
- package manager: vcpkg
- version: 3.3.1
- compiler: Visual Studio 2022
Reproduce problem
- In vs2022 project, enable use vcpkg option
- Add dependency
splitecpp - Compile by debug mode
my code:
#include <memory>
#include "SQLiteCpp/SQLiteCpp.h"
int main() {
auto m_datasheet = std::make_unique<SQLite::Database>("Common/Database/datasheet.db");
...
}
I solved it by defining SQLITECPP_COMPILE_DLL, but I think README.md needs explanation.
seems an error related to #432 this issue is only specific to vcpkg as cmake is working as expected, still I think it should be a good idea to put it in the readme so any vcpkg user is aware of it, feel free to open a PR