I following this tututorial: http://ift.tt/1DSBSEt to can start using sqlite in a Visual C++ App.
But I've created a Windows Forms Application instead.
I added this code in int main ():
sqlite3 *dbb;
char *zErrMsg;
int rc;
rc = sqlite3_open("test.db", &dbb);
And I get the following errors:
Error 2 error LNK2031: unable to generate p/invoke for "extern "C" int __clrcall sqlite3_open(char const *,struct sqlite3 * *)" (?sqlite3_open@@$$J0YMHPBDPAPAUsqlite3@@@Z); calling convention missing in metadata D:\Info\visual studio\bProject\bProject\bProject.obj
Warning 3 warning LNK4248: unresolved typeref token (01000027) for 'sqlite3'; image may not run D:\Info\visual studio\bProject\bProject\bProject.obj
Error 4 error LNK2028: unresolved token (0A00001B) "extern "C" int __clrcall sqlite3_open(char const *,struct sqlite3 * *)" (?sqlite3_open@@$$J0YMHPBDPAPAUsqlite3@@@Z) referenced in function "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z) D:\Info\visual studio\bProject\bProject\bProject.obj
Error 5 error LNK2019: unresolved external symbol "extern "C" int __clrcall sqlite3_open(char const *,struct sqlite3 * *)" (?sqlite3_open@@$$J0YMHPBDPAPAUsqlite3@@@Z) referenced in function "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z) D:\Info\visual studio\bProject\bProject\bProject.obj
Error 6 error LNK1120: 2 unresolved externals D:\Info\visual studio\bProject\Debug\bProject.exe
I searched about few hours what it means and how I can resolve them, but I found only that the library should not be linked correctly ...
Any ideas ?
Aucun commentaire:
Enregistrer un commentaire