I'm making a C++ DLL that requires SQLite.
I have integrated the SQLite header file (sqlite3.h) and added the library in the external dependencies. I have no syntax errors, but when I try to compile the project I get the following LNK2019 ("Unresolved external symbol [XYZ] referenced from the function …") errors:
error LNK2019: symbole externe non résolu sqlite3_close référencé dans la fonction "void __cdecl DisonnectDB(bool,struct sqlite3 *)" (?DisonnectDB@@YAX_NPEAUsqlite3@@@Z) C:\Users\Akash\Downloads\Learn Curve\Freelance\Travis\sana\Sana\Sana.obj Sana
error LNK2019: symbole externe non résolu sqlite3_column_text référencé dans la fonction "wchar_t const * __cdecl getTableData(struct sqlite3 *)" (?getTableData@@YAPEB_WPEAUsqlite3@@@Z) C:\Users\Akash\Downloads\Learn Curve\Freelance\Travis\sana\Sana\Sana.obj Sana
I have tried to do the same procedure in a test console application and I was able to compile with no errors so I am confident that the issue is not with the visibility of either the SQLite library or header file.
Other questions on Stack Overflow are not specific to how DLLs interact with static libraries.
Is there any additional configuration necessary to use the SQLite library in a DLL as opposed to the use in a console application?
How can I fix the compile time LNK2019 error?
Aucun commentaire:
Enregistrer un commentaire