c - Symbols like _sqlite3_open not found error -


Hello I am getting this error:

 Undefined symbols: "_sqlite3_open", referenced from: _main In ccRlWVer.o "_sqliite3_close", referred to: "_sqlite3_exec" in ccRlWVer.o, referred to: _main, in ccRlWVer.o, referenced from "_sqlite3_errmsg" _main, _main ccRlWVer.o in "_sqlite3_close", referenced from: ccRlWVer in _main . O LD: Symbol (s) not found Collection 2: Exit status of LD back 1 

This is my code:

  const char * filename = "database. Db "; Sqlite3 * ppDb; Int rc; RC = sqlite3_open (filename, and ppdb); If (RC) {FPrintf (stadder, "can not open database:% s \ n", sqlite3_errmsg (ppDb)); Sqlite3_close (ppDb); Exit (1); } Four * errMsg = 0; Sqlite3_exec (ppDb, sql, display_result, 0, and errMsg); If (rc! = SQLITE_OK) {fprintf (stderr, "SQL error:% s \ n", errMsg); } Sqliite3_close (ppDb); Return 0;  

You have to pass the library in this situation, with which you want to link your code Are it sqlite3

If you are using GCC:

  -lsqlite3  

In your arguments you enter the GCC Makefile / build command


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -