Linking to static library has no effect
-
Hello QT Community,
I have compiled SQLite3 from source and want to bind to the static (.a) library. I know that QT supports SQLite natively and provides drivers and API wrappings for it, but my task is to use it as an external library.
I tried both linking to the .a and the dynamic .so file. For both attempts, I left only the library that I intend to use and removed the unnecessary one:
- When attempting to link to the static .a - I removed the .so
- When attempting to link to the .so - I removed the .a
Still, with or without the following lines in .pro file, I always get errors like "‘SQLITE_API’ does not name a type".
INCLUDEPATH += "../../sqlite"
DEPENDPATH += "../../sqlite"
LIBS += -L../../sqlite -lsqlite3$ ls ../../sqlite
example example.c libsqlite3.a libsqlite3.so sqlite3 sqlite3.h sqlite3.o$ ar -t ../../sqlite/libsqlite3.a
sqlite3.o$ nm -C ../../sqlite/sqlite3.o | wc -l
3424When compiling a pure C or C++ example and linking to the libsqlite3.a everything works perfectly.
But from QT, it seems like that the LIBS and DEPENDPATH parameters get never used at all...Please advise...
-
@vmetodiev said in Linking to static library has no effect:
"‘SQLITE_API’ does not name a type".
This is compiler error, not linker.
Please post the whole error. -
Hello @jsulm ,
Thank you for your time! This is the compete build log:
11:13:07: Running steps for project QmlHelloWorld... 11:13:07: Configuration unchanged, skipping qmake step. 11:13:07: Starting: "/usr/bin/make" -j4 g++ -c -pipe -g -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_DECLARATIVE_DEBUG -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../QmlHelloWorld -I. -I../../doctest/doctest -I../../sqlite -I../../../5.9.8/gcc_64/include -I../../../5.9.8/gcc_64/include/QtQuick -I../../../5.9.8/gcc_64/include/QtGui -I../../../5.9.8/gcc_64/include/QtQml -I../../../5.9.8/gcc_64/include/QtNetwork -I../../../5.9.8/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../5.9.8/gcc_64/mkspecs/linux-g++ -o main.o ../QmlHelloWorld/main.cpp g++ -c -pipe -g -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_DECLARATIVE_DEBUG -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../QmlHelloWorld -I. -I../../doctest/doctest -I../../sqlite -I../../../5.9.8/gcc_64/include -I../../../5.9.8/gcc_64/include/QtQuick -I../../../5.9.8/gcc_64/include/QtGui -I../../../5.9.8/gcc_64/include/QtQml -I../../../5.9.8/gcc_64/include/QtNetwork -I../../../5.9.8/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../5.9.8/gcc_64/mkspecs/linux-g++ -o roadsignal.o ../QmlHelloWorld/roadsignal.cpp g++ -c -pipe -g -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_DECLARATIVE_DEBUG -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../QmlHelloWorld -I. -I../../doctest/doctest -I../../sqlite -I../../../5.9.8/gcc_64/include -I../../../5.9.8/gcc_64/include/QtQuick -I../../../5.9.8/gcc_64/include/QtGui -I../../../5.9.8/gcc_64/include/QtQml -I../../../5.9.8/gcc_64/include/QtNetwork -I../../../5.9.8/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../5.9.8/gcc_64/mkspecs/linux-g++ -o roadsignal_test.o ../QmlHelloWorld/roadsignal_test.cpp g++ -c -pipe -g -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_DECLARATIVE_DEBUG -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../QmlHelloWorld -I. -I../../doctest/doctest -I../../sqlite -I../../../5.9.8/gcc_64/include -I../../../5.9.8/gcc_64/include/QtQuick -I../../../5.9.8/gcc_64/include/QtGui -I../../../5.9.8/gcc_64/include/QtQml -I../../../5.9.8/gcc_64/include/QtNetwork -I../../../5.9.8/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../5.9.8/gcc_64/mkspecs/linux-g++ -o db.o ../QmlHelloWorld/db.cpp In file included from ../../../5.9.8/gcc_64/include/QtCore/qlocale.h:43, from ../../../5.9.8/gcc_64/include/QtCore/qtextstream.h:46, from ../../../5.9.8/gcc_64/include/QtCore/qdebug.h:49, from ../../../5.9.8/gcc_64/include/QtCore/QDebug:1, from ../QmlHelloWorld/db.cpp:1: ../../../5.9.8/gcc_64/include/QtCore/qvariant.h: In constructor ‘QVariant::QVariant(QVariant&&)’: ../../../5.9.8/gcc_64/include/QtCore/qvariant.h:265:25: warning: implicitly-declared ‘QVariant::Private& QVariant::Private::operator=(const QVariant::Private&)’ is deprecated [-Wdeprecated-copy] 265 | { other.d = Private(); } | ^ ../../../5.9.8/gcc_64/include/QtCore/qvariant.h:380:16: note: because ‘QVariant::Private’ has user-provided ‘QVariant::Private::Private(const QVariant::Private&)’ 380 | inline Private(const Private &other) Q_DECL_NOTHROW | ^~~~~~~ In file included from ../../../5.9.8/gcc_64/include/QtCore/qlocale.h:43, from ../../../5.9.8/gcc_64/include/QtCore/qtextstream.h:46, from ../../../5.9.8/gcc_64/include/QtCore/qdebug.h:49, from ../../../5.9.8/gcc_64/include/QtCore/QDebug:1, from ../QmlHelloWorld/roadsignal.cpp:2: ../../../5.9.8/gcc_64/include/QtCore/qvariant.h: In constructor ‘QVariant::QVariant(QVariant&&)’: ../../../5.9.8/gcc_64/include/QtCore/qvariant.h:265:25: warning: implicitly-declared ‘QVariant::Private& QVariant::Private::operator=(const QVariant::Private&)’ is deprecated [-Wdeprecated-copy] 265 | { other.d = Private(); } | ^ ../../../5.9.8/gcc_64/include/QtCore/qvariant.h:380:16: note: because ‘QVariant::Private’ has user-provided ‘QVariant::Private::Private(const QVariant::Private&)’ 380 | inline Private(const Private &other) Q_DECL_NOTHROW | ^~~~~~~ In file included from ../../../5.9.8/gcc_64/include/QtCore/qlocale.h:43, from ../../../5.9.8/gcc_64/include/QtGui/qguiapplication.h:47, from ../../../5.9.8/gcc_64/include/QtGui/QGuiApplication:1, from ../QmlHelloWorld/main.cpp:1: ../../../5.9.8/gcc_64/include/QtCore/qvariant.h: In constructor ‘QVariant::QVariant(QVariant&&)’: ../../../5.9.8/gcc_64/include/QtCore/qvariant.h:265:25: warning: implicitly-declared ‘QVariant::Private& QVariant::Private::operator=(const QVariant::Private&)’ is deprecated [-Wdeprecated-copy] 265 | { other.d = Private(); } | ^ ../../../5.9.8/gcc_64/include/QtCore/qvariant.h:380:16: note: because ‘QVariant::Private’ has user-provided ‘QVariant::Private::Private(const QVariant::Private&)’ 380 | inline Private(const Private &other) Q_DECL_NOTHROW | ^~~~~~~ /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/bin/rcc -name qml ../QmlHelloWorld/qml.qrc -o qrc_qml.cpp g++ -pipe -g -std=gnu++11 -Wall -W -dM -E -o moc_predefs.h ../../../5.9.8/gcc_64/mkspecs/features/data/dummy.cpp g++ -c -pipe -g -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_DECLARATIVE_DEBUG -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../QmlHelloWorld -I. -I../../doctest/doctest -I../../sqlite -I../../../5.9.8/gcc_64/include -I../../../5.9.8/gcc_64/include/QtQuick -I../../../5.9.8/gcc_64/include/QtGui -I../../../5.9.8/gcc_64/include/QtQml -I../../../5.9.8/gcc_64/include/QtNetwork -I../../../5.9.8/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../5.9.8/gcc_64/mkspecs/linux-g++ -o qrc_qml.o qrc_qml.cpp /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/bin/moc -DQT_DEPRECATED_WARNINGS -DQT_DECLARATIVE_DEBUG -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB --include ./moc_predefs.h -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore -I. -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/c++/7.3.0 -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/c++/7.3.0/arm-angstrom-linux-gnueabi -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/c++/7.3.0/backward -I/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/lib/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/7.3.0/include -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/gcc/arm-angstrom-linux-gnueabi/7.3.0/include -I/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/lib/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/7.3.0/include-fixed -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include ../QmlHelloWorld/roadsignal.h -o moc_roadsignal.cpp g++ -c -pipe -g -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_DECLARATIVE_DEBUG -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../QmlHelloWorld -I. -I../../doctest/doctest -I../../sqlite -I../../../5.9.8/gcc_64/include -I../../../5.9.8/gcc_64/include/QtQuick -I../../../5.9.8/gcc_64/include/QtGui -I../../../5.9.8/gcc_64/include/QtQml -I../../../5.9.8/gcc_64/include/QtNetwork -I../../../5.9.8/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../5.9.8/gcc_64/mkspecs/linux-g++ -o moc_roadsignal.o moc_roadsignal.cpp In file included from ../../../5.9.8/gcc_64/include/QtCore/qlocale.h:43, from ../../../5.9.8/gcc_64/include/QtCore/qtextstream.h:46, from ../../../5.9.8/gcc_64/include/QtCore/qdebug.h:49, from ../../../5.9.8/gcc_64/include/QtCore/QDebug:1, from ../QmlHelloWorld/roadsignal_test.cpp:12: ../../../5.9.8/gcc_64/include/QtCore/qvariant.h: In constructor ‘QVariant::QVariant(QVariant&&)’: ../../../5.9.8/gcc_64/include/QtCore/qvariant.h:265:25: warning: implicitly-declared ‘QVariant::Private& QVariant::Private::operator=(const QVariant::Private&)’ is deprecated [-Wdeprecated-copy] 265 | { other.d = Private(); } | ^ ../../../5.9.8/gcc_64/include/QtCore/qvariant.h:380:16: note: because ‘QVariant::Private’ has user-provided ‘QVariant::Private::Private(const QVariant::Private&)’ 380 | inline Private(const Private &other) Q_DECL_NOTHROW | ^~~~~~~ In file included from ../QmlHelloWorld/db.h:4, from ../QmlHelloWorld/main.cpp:8: ../../sqlite/sqlite3.h: At global scope: ../../sqlite/sqlite3.h:10114:1: error: ‘SQLITE_API’ does not name a type 10114 | SQLITE_API int sqlite3_rtree_geometry_callback( | ^~~~~~~~~~ ../../sqlite/sqlite3.h:10140:1: error: ‘SQLITE_API’ does not name a type 10140 | SQLITE_API int sqlite3_rtree_query_callback( | ^~~~~~~~~~ ../../sqlite/sqlite3.h:10169:3: error: ‘sqlite3_int64’ does not name a type 10169 | sqlite3_int64 iRowid; /* Rowid for current entry */ | ^~~~~~~~~~~~~ ../../sqlite/sqlite3.h:10175:3: error: ‘sqlite3_value’ does not name a type 10175 | sqlite3_value **apSqlParam; /* Original SQL values of parameters */ | ^~~~~~~~~~~~~ ../../sqlite/sqlite3.h:11959:3: error: ‘sqlite3_context’ has not been declared 11959 | sqlite3_context *pCtx, /* Context for returning result/error */ | ^~~~~~~~~~~~~~~ ../../sqlite/sqlite3.h:11961:3: error: ‘sqlite3_value’ has not been declared 11961 | sqlite3_value **apVal /* Array of trailing arguments */ | ^~~~~~~~~~~~~ ../../sqlite/sqlite3.h:12186:34: error: ‘sqlite3_int64’ has not been declared 12186 | int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow); | ^~~~~~~~~~~~~ ../../sqlite/sqlite3.h:12187:51: error: ‘sqlite3_int64’ has not been declared 12187 | int (*xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken); | ^~~~~~~~~~~~~ ../../sqlite/sqlite3.h:12201:18: error: expected identifier before ‘*’ token 12201 | sqlite3_int64 (*xRowid)(Fts5Context*); | ^ ../../sqlite/sqlite3.h:12201:3: error: ISO C++ forbids declaration of ‘sqlite3_int64’ with no type [-fpermissive] 12201 | sqlite3_int64 (*xRowid)(Fts5Context*); | ^~~~~~~~~~~~~ ../../sqlite/sqlite3.h:12201:39: error: ‘sqlite3_int64’ declared as function returning a function 12201 | sqlite3_int64 (*xRowid)(Fts5Context*); | ^ make: *** [Makefile:1202: main.o] Error 1 make: *** Waiting for unfinished jobs.... 11:13:10: The process "/usr/bin/make" exited with code 2. Error while building/deploying project QmlHelloWorld (kit: Desktop Qt 5.9.8 GCC 64bit) When executing step "Make" 11:13:10: Elapsed time: 00:04.
If I remove the section inside the project file with:
INCLUDEPATH += "../../sqlite"
DEPENDPATH += "../../sqlite"
LIBS += -L../../sqlite -lsqlite3the errors are the same...
-
Your LIBS declaration looks fine but as @jsulm said, your compiler runs into an error. It looks like either
#include<sqlite>
is missing in your implementation or the included headers do not match the shared library you pass to the linker. -
Thanks to all of you guys who are trying to help me!
$ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.2.0-7ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-ZPT0kp/gcc-11-11.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-ZPT0kp/gcc-11-11.2.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.2.0 (Ubuntu 11.2.0-7ubuntu2)
Also any special reason you're using a version of Qt so antiquated?
- Yes, I need to deploy the same application on an ARM platform (Toradex) that runs Qt 5.9.7 / 5.9.8...
And again, when I compile outside QT, everything runs fine:
$ g++ -o example example.cpp -l sqlite3 $ ./example Output: 3.35.5
I am completely lost with that issue....
-
Merry Christmas!
There's something fishy with the headers I'd say. Are you certain you're picking up your version of the library headers and not the ones from the distro?
One thing you could do is to run
qmake -d
to see some more verbose output at the generation stage. Typically that macro (SQLITE_API) should've been defined either in a header of sqlite or by the build system itself.Also please provide the minimal example you're using to test this out, so we see some code.
-
Merry Christmas (with some delay) to you as well, wish you all the best!
So, here is the "qmake -d" output:
$ ./qmake -d /home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld/QmlHelloWorld.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug 2>&1 | grep -i 'sqlite' | tee /tmp/qmake.log
DEBUG 1: /home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld/QmlHelloWorld.pro:4: INCLUDEPATH := ../../doctest/doctest ../../sqlite DEBUG 1: /home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld/QmlHelloWorld.pro:26: DEPENDPATH := ../../sqlite DEBUG 1: /home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld/QmlHelloWorld.pro:27: LIBS := -L../../sqlite -lsqlite3 DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/qt.prf:229: INCLUDEPATH := ../../doctest/doctest ../../sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/qt.prf:236: LIBS := -L../../sqlite -lsqlite3 -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/qt.prf:239: LIBS := -L../../sqlite -lsqlite3 -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Quick DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/qt.prf:229: INCLUDEPATH := ../../doctest/doctest ../../sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/qt.prf:236: LIBS := -L../../sqlite -lsqlite3 -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Quick -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/qt.prf:239: LIBS := -L../../sqlite -lsqlite3 -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Quick -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Gui DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/qt.prf:229: INCLUDEPATH := ../../doctest/doctest ../../sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/qt.prf:236: LIBS := -L../../sqlite -lsqlite3 -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Quick -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Gui -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/qt.prf:239: LIBS := -L../../sqlite -lsqlite3 -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Quick -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Gui -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Qml DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/qt.prf:229: INCLUDEPATH := ../../doctest/doctest ../../sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/qt.prf:236: LIBS := -L../../sqlite -lsqlite3 -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Quick -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Gui -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Qml -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/qt.prf:239: LIBS := -L../../sqlite -lsqlite3 -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Quick -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Gui -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Qml -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Network DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/qt.prf:229: INCLUDEPATH := ../../doctest/doctest ../../sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/qt.prf:236: LIBS := -L../../sqlite -lsqlite3 -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Quick -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Gui -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Qml -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Network -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/qt.prf:239: LIBS := -L../../sqlite -lsqlite3 -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Quick -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Gui -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Qml -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Network -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Core DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:9: entering loop for inc over ../../doctest/doctest ../../sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:10: loop iteration "../../sqlite" DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:10: calling built-in $$absolute_path(../../sqlite, /home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld) DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:10: MOC_INCLUDEPATH := /home/vmetodiev/Qt5.9.8/Projects/doctest/doctest /home/vmetodiev/Qt5.9.8/Projects/sqlite DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:10: MOC_INCLUDEPATH := /home/vmetodiev/Qt5.9.8/Projects/doctest/doctest /home/vmetodiev/Qt5.9.8/Projects/sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:10: MOC_INCLUDEPATH := /home/vmetodiev/Qt5.9.8/Projects/doctest/doctest /home/vmetodiev/Qt5.9.8/Projects/sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:10: MOC_INCLUDEPATH := /home/vmetodiev/Qt5.9.8/Projects/doctest/doctest /home/vmetodiev/Qt5.9.8/Projects/sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:10: MOC_INCLUDEPATH := /home/vmetodiev/Qt5.9.8/Projects/doctest/doctest /home/vmetodiev/Qt5.9.8/Projects/sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:10: MOC_INCLUDEPATH := /home/vmetodiev/Qt5.9.8/Projects/doctest/doctest /home/vmetodiev/Qt5.9.8/Projects/sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:10: MOC_INCLUDEPATH := /home/vmetodiev/Qt5.9.8/Projects/doctest/doctest /home/vmetodiev/Qt5.9.8/Projects/sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:11: MOC_INCLUDEPATH := /home/vmetodiev/Qt5.9.8/Projects/doctest/doctest /home/vmetodiev/Qt5.9.8/Projects/sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore . DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:13: MOC_INCLUDEPATH := /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ /home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld /home/vmetodiev/Qt5.9.8/Projects/doctest/doctest /home/vmetodiev/Qt5.9.8/Projects/sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore . /usr/include/c++/11 /usr/include/x86_64-linux-gnu/c++/11 /usr/include/c++/11/backward /usr/lib/gcc/x86_64-linux-gnu/11/include /usr/local/include /usr/include/x86_64-linux-gnu /usr/include DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:92: INCLUDEPATH := ../../doctest/doctest ../../sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/bin DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/unix/opengl.prf:7: INCLUDEPATH := ../../doctest/doctest ../../sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/bin /usr/include/libdrm DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/unix/opengl.prf:10: LIBS := -L../../sqlite -lsqlite3 -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Quick -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Gui -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Qml -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Network -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Core -lGL DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/unix/thread.prf:9: INCLUDEPATH := ../../doctest/doctest ../../sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/bin /usr/include/libdrm DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/unix/thread.prf:10: LIBS := -L../../sqlite -lsqlite3 -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Quick -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Gui -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Qml -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Network -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Core -lGL -lpthread DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/qmake_use.prf:14: LIBS := -L../../sqlite -lsqlite3 -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Quick -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Gui -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Qml -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Network -L/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Core -lGL -lpthread DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/qmake_use.prf:20: INCLUDEPATH := ../../doctest/doctest ../../sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/bin /usr/include/libdrm DEBUG 1: Dependency Directories: ../../sqlite :: ../../../Projects/qmlplayground/QmlHelloWorld :: . :: ../../../Projects/doctest/doctest :: ../../../Projects/sqlite :: ../include :: ../include/QtQuick :: ../include/QtGui :: ../include/QtQml :: ../include/QtNetwork :: ../include/QtCore :: . :: /usr/include/libdrm :: ../mkspecs/linux-g++ DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:51: entering loop for inc over /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ /home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld /home/vmetodiev/Qt5.9.8/Projects/doctest/doctest /home/vmetodiev/Qt5.9.8/Projects/sqlite /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore . /usr/include/c++/11 /usr/include/x86_64-linux-gnu/c++/11 /usr/include/c++/11/backward /usr/lib/gcc/x86_64-linux-gnu/11/include /usr/local/include /usr/include/x86_64-linux-gnu /usr/include DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:52: loop iteration "/home/vmetodiev/Qt5.9.8/Projects/sqlite" DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:52: calling built-in $$shell_quote(/home/vmetodiev/Qt5.9.8/Projects/sqlite) DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:52: incvar := -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:52: incvar := -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:52: incvar := -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:52: incvar := -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:52: incvar := -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:52: incvar := -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:52: incvar := -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:52: incvar := -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore -I. DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:52: incvar := -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore -I. -I/usr/include/c++/11 DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:52: incvar := -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore -I. -I/usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:52: incvar := -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore -I. -I/usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -I/usr/include/c++/11/backward DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:52: incvar := -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore -I. -I/usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -I/usr/include/c++/11/backward -I/usr/lib/gcc/x86_64-linux-gnu/11/include DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:52: incvar := -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore -I. -I/usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -I/usr/include/c++/11/backward -I/usr/lib/gcc/x86_64-linux-gnu/11/include -I/usr/local/include DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:52: incvar := -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore -I. -I/usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -I/usr/include/c++/11/backward -I/usr/lib/gcc/x86_64-linux-gnu/11/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:52: incvar := -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore -I. -I/usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -I/usr/include/c++/11/backward -I/usr/lib/gcc/x86_64-linux-gnu/11/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:53: incvar := -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore -I. -I/usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -I/usr/include/c++/11/backward -I/usr/lib/gcc/x86_64-linux-gnu/11/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include DEBUG 1: /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/features/moc.prf:62: RET := /home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/bin/moc $(DEFINES) --include ./moc_predefs.h -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/mkspecs/linux-g++ -I/home/vmetodiev/Qt5.9.8/Projects/qmlplayground/QmlHelloWorld -I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQuick -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtGui -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtQml -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtNetwork -I/home/vmetodiev/Qt5.9.8/5.9.8/gcc_64/include/QtCore -I. -I/usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -I/usr/include/c++/11/backward -I/usr/lib/gcc/x86_64-linux-gnu/11/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include
-
This:
-I/home/vmetodiev/Qt5.9.8/Projects/doctest/doctest -I/home/vmetodiev/Qt5.9.8/Projects/sqlite
makes no sense to me. What's in these folders and why is it added to the include path? Please provide the full
.pro
file you're using. Also show what're the includes in the top part of thedb.h
header. Additional question: which version ofsqlite
and where did you get it from? -
Hello,
This is my project file:
QT += qml quick CONFIG += c++11 qml_debug declarative_debug console INCLUDEPATH += "../../doctest/doctest" \ "../../sqlite" # The following define makes your compiler emit warnings if you use # any feature of Qt which as been marked deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp \ roadsignal.cpp \ roadsignal_test.cpp \ db.cpp RESOURCES += qml.qrc DEPENDPATH += "../../sqlite" LIBS += -L../../sqlite -lsqlite3 # Additional import path used to resolve QML modules in Qt Creator's code model QML_IMPORT_PATH = # Additional import path used to resolve QML modules just for Qt Quick Designer QML_DESIGNER_IMPORT_PATH = # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target HEADERS += \ roadsignal.h \ common.h \ db.h
The db.h:
#ifndef SQLITE3_H #define SQLITE3_H #include "sqlite3.h" int testdb(void); #endif // SQLITE3_H
And the db.cpp:
#include<QDebug> //#include "db.h" #include "../../sqlite/sqlite3.h" int testdb(void) { sqlite3 *db; sqlite3_stmt *res; int rc = sqlite3_open(":memory:", &db); if (rc != SQLITE_OK) { qDebug() << "Cannot open database: %s\n" << sqlite3_errmsg(db); sqlite3_close(db); return 1; } rc = sqlite3_prepare_v2(db, "SELECT SQLITE_VERSION()", -1, &res, 0); if (rc != SQLITE_OK) { qDebug() << "Failed to fetch data: %s\n" << sqlite3_errmsg(db); sqlite3_close(db); return 1; } rc = sqlite3_step(res); if (rc == SQLITE_ROW) { qDebug() << sqlite3_column_text(res, 0); } sqlite3_finalize(res); sqlite3_close(db); return 0; }
There is something really weird with the following:
//#include "db.h" ---> If I use it, the errors appear directly in the code editor and F2 does not redirect me to the definitions.
#include "../../sqlite/sqlite3.h" ---> Used it just to get rid of the upper mentioned. F2 redirects to my custom sqlite3.h file.Could it be related to the fact that my project is C++ and all SQLite code is pure C... and QT somehow refuses to look within the extern "C" blocks?
And the header file are located as follows:
$ tree ../../sqlite/
../../sqlite/ ├── example ├── example.cpp ├── libsqlite3.a ├── libsqlite3.so ├── sqlite3 ├── sqlite3.h └── sqlite3.o
which version of sqlite and where did you get it from
--> From the official website, building it from source. Version: 3.35.5. -
Remove this:
DEPENDPATH += "../../sqlite"
for good. You shouldn't change it to begin with.
#ifndef SQLITE3_H #define SQLITE3_H #include "sqlite3.h"
You're overwriting sqlite's own macro here, so
#include "sqlite3.h"
does absolutely nothing, hence the compiler errors. Change this to reflect your own header instead. E.g.#ifndef MYAPP_DB_H
And finally (advice):
#include<QDebug> //#include "db.h" < Use this #include "../../sqlite/sqlite3.h" // < don't use this
-
That was it! It works now! Thank you sooooo much!