Undefined reference
-
Hey folks,
I'm facing a bit of a challenge here. During the compilation of my application, I'm bombarded with numerous errors, each indicating an "undefined reference" to QSqlRecord, QSqlError, QSqlDatabase, and similar symbols. I'm utilizing .pro files for my project configuration, where I've included the necessary Qt modules:
QT += core QT += network QT += sql
It seems like the linker is struggling to find the definitions for these symbols. Any insights or advice on how to resolve this issue would be greatly appreciated!
-
Hey folks,
I'm facing a bit of a challenge here. During the compilation of my application, I'm bombarded with numerous errors, each indicating an "undefined reference" to QSqlRecord, QSqlError, QSqlDatabase, and similar symbols. I'm utilizing .pro files for my project configuration, where I've included the necessary Qt modules:
QT += core QT += network QT += sql
It seems like the linker is struggling to find the definitions for these symbols. Any insights or advice on how to resolve this issue would be greatly appreciated!
@primator77 could be the linker but it could also be a missing
#include
in code. Qt used forward declarations a lot. -
Hey folks,
I'm facing a bit of a challenge here. During the compilation of my application, I'm bombarded with numerous errors, each indicating an "undefined reference" to QSqlRecord, QSqlError, QSqlDatabase, and similar symbols. I'm utilizing .pro files for my project configuration, where I've included the necessary Qt modules:
QT += core QT += network QT += sql
It seems like the linker is struggling to find the definitions for these symbols. Any insights or advice on how to resolve this issue would be greatly appreciated!
@primator77
If the errors are during compilation, as you write, then you are not#include
-ing the necessary header files.
If the errors are during linking then you are not linking with the right libraries.
So which is it? -
Hey folks,
I'm facing a bit of a challenge here. During the compilation of my application, I'm bombarded with numerous errors, each indicating an "undefined reference" to QSqlRecord, QSqlError, QSqlDatabase, and similar symbols. I'm utilizing .pro files for my project configuration, where I've included the necessary Qt modules:
QT += core QT += network QT += sql
It seems like the linker is struggling to find the definitions for these symbols. Any insights or advice on how to resolve this issue would be greatly appreciated!
@primator77 Did you re-run qmake after you modified the PRO file?
-
P Pl45m4 referenced this topic on