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

MSVC: Unresolved symbol SQLite::assertion_failed for example1 #459

Open
thbeu opened this issue Mar 1, 2024 · 0 comments
Open

MSVC: Unresolved symbol SQLite::assertion_failed for example1 #459

thbeu opened this issue Mar 1, 2024 · 0 comments

Comments

@thbeu
Copy link
Contributor

thbeu commented Mar 1, 2024

When configuring with -DSQLITE_ENABLE_ASSERT_HANDLER:BOOL=ON (and building static libs) the example1 fails to build on MSVC with

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

void assertion_failed(const char* apFile, const long apLine, const char* apFunc, const char* apExpr, const char* apMsg)

and

void assertion_failed(const char* apFile, const int apLine, const char* apFunc,

Note the const long apLine vs. const int apLine.

@thbeu thbeu changed the title Unresolved symbol SQLite::assertion_failed MSVC: Unresolved symbol SQLite::assertion_failed for example1 Mar 18, 2024
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