I'm having some trouble incorporating sqlite3 into a program I'm writing. I've been scouring the internet over the past few days attempting to find a solution. I'm using the MinGW compiler and have already tried:
Ensuring the C:\MinGW\bin directory is included in both the user and system environment Path variables with no spaces and separated with a semi-colon
Using the command prompt and entering "C:\MinGW\bin\gcc shell.c sqlite3.c -lpthread -ldl" in the same directory of all related files which returns the result "c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe: cannot find -ldl collect2.exe: error: ld returned 1 exit status"
Fresh install of MinGW and eclipse
If it helps this is the code I'm testing this with, I can't get the includes to show up as code but they are all in carets in order, iostream, stdio.h, and sqlite3.h It returns the error "fatal error: sqlite3.h: No such file or directory". I have all of the include files in the same directory as the .cpp source as well.
int main(int argc, char* argv[])
{
sqlite3 *db;
char *zErrMsg = 0;
int rc;
rc = sqlite3_open("text.db", &db);
return 0;
}