Undefined reference error - how to add #include to .pro file ?
-
When I add a library to a project I end up with this
INCLUDEPATH += $$PWD/../../../../../BT_Config_Library
DEPENDPATH += $$PWD/../../../../../BT_Config_LibraryI tried to "extend " the above to INCLUDEPATH to header file.
It did noit workINCLUDEPATH += $$PWD/../../../../../BT_Config_Library/bt_config_mainwindow.h
INCLUDEPATH += $$PWD/bt_config_mainwindow.h
I found the resource :
https://doc.qt.io/qt-5/qmake-variable-reference.html#includepath
OK, I got undefined reference to `BT_Configuration_MainWindow error
It doe not tell me which .cpp in ,pro is missing it, hence I woulkd like to add required #inlcude to the .pro file without messing with existing .pro file HEADERSMy RTFM retrieved this
https://stackoverflow.com/questions/4134764/how-to-define-several-include-path-in-makefile
It adds directories...
What is a correct syntax to add
#include "../BT_Config_Library/bt_config_mainwindow.h"
to .pro (Makefile) ?
INC += "../BT_Config_Library/bt_config_mainwindow.h"
did not work and I am just too tired to " try this and try that ..."
PS
Reference t o Make would be nice:-1: error: /media/nov25-1/AAA_OS_RAID/RECOVERY_BACKUP_FEB18_/RECOVERY/BLUETOOTH/MAIN_PROJECT/../SOURCE/CCC_SOURCE/terminal_SERIAL_BLUETOOTH_VER_1/terminal_SERIAL_BLUETOOTH/terminal_BLUETOOTH//libterminal_BLUETOOTH.so: undefined reference to `BT_Configuration_MainWindow::BT_Configuration_MainWindow(QWidget*)'
-
Looks like the headers are fine, but you don't seem to link the library where the things from this header is implemented, i.e. something like
LIBS += -L$SOME_PATH -lBT_Config_Library
Seen https://doc.qt.io/qt-6/qmake-variable-reference.html#libs