vendredi 27 février 2015

How to use SQLite3 library in MSVC project?

I want to build a native C++ application using sqlite3.dll. I tried to build it from SQLite amalgamation source. It creates the dll and the lib file (is the lib the dll's import library?) but when I use it in my project, I get errors like



error LNK2019: unresolved external symbol _sqlite3_open referenced in function...


I tried to prefix underscore in the def file (I set the Module Definition File in the Linker Input options), but tough luck.


What am I doing wrong? It looks like the reference is missing: I added SQLite.lib (the lib file I created) in the Additional Dependencies in the Project where I want to use it. I added its directory to Library Directories.


I use MSVC 2010 Express and I am just about to curse it.


Aucun commentaire:

Enregistrer un commentaire