I've compiled SQLiteCPP with no errors. Steps: clone SQLiteCPP, build.sh, cd build, make, make all, sudo make install
I've verified that the files have copied to /usr/local/include
I'm including it all in my task.json:
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++ build active file",
"command": "/usr/bin/g++",
"args": [
"-fdiagnostics-color=always",
"-fsanitize=address",
"-I/usr/local/include/",
"-I/usr/local/lib/wx/include/gtk3-unicode-3.2",
"-I/usr/local/include/wx-3.2",
"-D_FILE_OFFSET_BITS=64",
"-DWXUSINGDLL",
"-D__WXGTK__",
"-pthread",
"-g3",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"-L/usr/local/lib",
"-pthread",
"-lwx_gtk3u_xrc-3.2",
"-lwx_gtk3u_html-3.2",
"-lwx_gtk3u_qa-3.2",
"-lwx_gtk3u_core-3.2",
"-lwx_baseu_xml-3.2",
"-lwx_baseu_net-3.2",
"-lwx_baseu-3.2",
"-lsqlite3",
"-lSQLiteCpp"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
The output of compile:
Starting build...
/usr/bin/g++ -fdiagnostics-color=always -fsanitize=address -I/usr/local/include/ -I/usr/local/lib/wx/include/gtk3-unicode-3.2 -I/usr/local/include/wx-3.2 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -g3 /home/me/src/no_cmake/src/main.cpp -o /home/me/src/no_cmake/src/main -L/usr/local/lib -pthread -lwx_gtk3u_xrc-3.2 -lwx_gtk3u_html-3.2 -lwx_gtk3u_qa-3.2 -lwx_gtk3u_core-3.2 -lwx_baseu_xml-3.2 -lwx_baseu_net-3.2 -lwx_baseu-3.2 -lsqlite3 -lSQLiteCpp
/usr/bin/ld: /usr/local/lib/libSQLiteCpp.a(Database.cpp.o): in function `SQLite::getLibVersion()':
/home/me/src/SQLiteCpp/src/Database.cpp:52: undefined reference to `sqlite3_libversion'
/usr/bin/ld: /usr/local/lib/libSQLiteCpp.a(Database.cpp.o): in function `SQLite::getLibVersionNumber()':
/home/me/src/SQLiteCpp/src/Database.cpp:58: undefined reference to `sqlite3_libversion_number'
It looks like I'm linking everything correctly? But I'm new to C++ so...
edit: On SQLiteCPP's git, I see this in the cmake file: set(SQLITECPP_RUN_CPPCHECK OFF CACHE BOOL "" FORCE) set(SQLITECPP_RUN_CPPLINT OFF CACHE BOOL "" FORCE) set(SQLITECPP_USE_STATIC_RUNTIME OFF CACHE BOOL "" FORCE)
Do I somehow need to set that during compile? I wasn't sure how and trying not to use cmake for this.