vendredi 27 février 2015

Error when trying to compile using sqlite3_open in Visual Studio 2013


Vote count:

0




I'm working in a Cocos2dx (c++) win 32 project and trying to use sqlite to save the game data. My knowledge of c++ / Visual Studio is very limited right now.


This is part of the code that I'm trying to compile.



#include <sqlite3\include\sqlite3.h>
...
void HelloWorld::SaveAndLoadTest()
{
sqlite3 *pdb = NULL;
sqlite3_open("writablePath", &pdb);
...
}


But when I try to compile the line with the sqlite3_open command I get the following error:


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


I've been trying to find an answer for this many hours. The most similar question I found was this one but I don't understand the answer. Error: undefined reference to `sqlite3_open'



You need to link the sqlite3 library along with your program:



g++ main.cpp -lsqlite3


I'm new to Visual Studio and I don't understand how to solve this, anyone?



asked 30 secs ago







Error when trying to compile using sqlite3_open in Visual Studio 2013

Aucun commentaire:

Enregistrer un commentaire