I'm trying to move things from Windows to Linux, with SQLite, but things are not 1:1.
I can use sqlite3 from terminal.
Using this Sqlite tutorial:
https://www.tutorialspoint.com/sqlite/sqlite_c_cpp.htm
(the -l is shown in the build for C++ comment...)
With below simple console app:(<> Code format does nothing, ?)
-- Code --
include <stdio.h>
#include <sqlite3.h>
int main(int argc, char* argv[])
{
sqlite3 *db;
char *zErrMsg = 0;
int rc;
rc = sqlite3_open("test.db", &db);
if( rc ){
fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
return(0);
}else{
fprintf(stderr, "Opened database successfully\n");
}
sqlite3_close(db);
}
-- Code --
I'm not able to interpret following error on compile:
/usr/bin/ld: cannot find -l -pthread
collect2: error: ld returned 1 exit status
There is no file named 'pthread' or 'lpthread' that I have found.
Any advice appreciated.
Please try and be specific, I may have follow-up questions.