I am trying to build SQLite3 plugin for Qt since I need to use SQLite specific hook functions. I have prebuilt Qt 6.5.1 on windows machine mingw_64 version. I have built plugin which works with qt functions but gives me undefined reference when I am trying to use any SQLite3 function.
I have tried the following from what Qt docs suggests:
- Downloaded SQLite 3.42.0 source (amalgamation) and windows binaries from here
- Compiled binaries into sqlite3.lib via CMD for VS 2017 with: "lib /DEF:sqlite3.def /OUT:sqlite3.lib /MACHINE:x64"
- configured via Qt 6.5.1 CMD with command: "qt-cmake -G Ninja C:\Qt\6.5.1\Src\qtbase\src\plugins\sqldrivers -DCMAKE_INSTALL_PREFIX=C:\Qt\6.5.1\mingw_64 -DCMAKE_INCLUDE_PATH=C:\libs\sqlite-amalgamation-3420000 -DCMAKE_LIBRARY_PATH=C:\libs\sqlite-amalgamation-3420000 -DFEATURE_system_sqlite=ON". All sqlite3 files (binaries and .c/.h) were in sqlite-amalgamation-3420000 folder.
- cmake --build .
- cmake --install .
- Using sqlite header file in my project tried to call a function which gives me error of undefined reference
Maybe someone can tell me on what I am doing wrong. Thanks in advance.