SRombauts / SQLiteCpp

SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.
http://srombauts.github.io/SQLiteCpp
MIT License
2.17k stars 507 forks source link

LNK2001: unresolved external symbol "SQLite::OPEN_READONLY" #471

Open index1207 opened 1 month ago

index1207 commented 1 month ago

Environmnet

Reproduce problem

index1207 commented 1 month ago

my code:

#include <memory>
#include "SQLiteCpp/SQLiteCpp.h"

int main() {
  auto m_datasheet = std::make_unique<SQLite::Database>("Common/Database/datasheet.db");
  ...
}
index1207 commented 1 month ago

I solved it by defining SQLITECPP_COMPILE_DLL, but I think README.md needs explanation.

UnixY2K commented 1 month ago

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