I am working on my coursework for my university. It consists on making a database in c++. I have those errors from Monday and I can not solve them.
Can anyone help me to fix this issue, please?
I am working in VSCode and I am a beginner in c++, thank you.
code:
#include <stdio.h>
#include <D:\SSD\Desctop\barethika\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);
}
ERRORS:
c:\users\name\AppData\Local\Temp\ccguCZxk.o:tempCodeRunnerFile.cpp(.text+00xa4) undefined reference to 'sqlite3_open' c:\users\name\AppData\Local\Temp\ccguCZxk.o:tempCodeRunnerFile.cpp(.text+00xa4) undefined reference to 'sqlite3_errmsg' c:\users\name\AppData\Local\Temp\ccguCZxk.o:tempCodeRunnerFile.cpp(.text+00xa4) undefined reference to 'sqlite3_close' collect2.exe:error: ld returned 1 exit status