Open thbeu opened 6 months ago
When configuring with -DSQLITE_ENABLE_ASSERT_HANDLER:BOOL=ON (and building static libs) the example1 fails to build on MSVC with
-DSQLITE_ENABLE_ASSERT_HANDLER:BOOL=ON
main.obj : error LNK2019: unresolved external symbol "void cdecl SQLite::assertion_failed(char const ,int,char const ,char const ,char const )" (?assertion_failed@SQLite@@YAXPEBDH000@Z) referenced in function main SQLiteCpp.lib(Database.obj) : error LNK2001: unresolved external symbol "void cdecl SQLite::assertion_failed(char const ,int,char const ,char const ,char const )" (?assertion_failed@SQLite@@YAXPEBDH000@Z) C:\Path\win64\bin\Release\SQLiteCpp_example1.exe : fatal error LNK1120: 1 unresolved externals
Can be easily fixed if the declarations of SQLite::assertion_failed are identical in
SQLite::assertion_failed
https://github.com/SRombauts/SQLiteCpp/blob/7dbcf482f25a1bed246051d875f2e0849a6ddddb/examples/example1/main.cpp#L26
and
https://github.com/SRombauts/SQLiteCpp/blob/7dbcf482f25a1bed246051d875f2e0849a6ddddb/include/SQLiteCpp/Assertion.h#L29
Note the const long apLine vs. const int apLine.
const long apLine
const int apLine
When configuring with
-DSQLITE_ENABLE_ASSERT_HANDLER:BOOL=ON
(and building static libs) the example1 fails to build on MSVC withCan be easily fixed if the declarations of
SQLite::assertion_failed
are identical inhttps://github.com/SRombauts/SQLiteCpp/blob/7dbcf482f25a1bed246051d875f2e0849a6ddddb/examples/example1/main.cpp#L26
and
https://github.com/SRombauts/SQLiteCpp/blob/7dbcf482f25a1bed246051d875f2e0849a6ddddb/include/SQLiteCpp/Assertion.h#L29
Note the
const long apLine
vs.const int apLine
.