cmake project configured incorrectly
Solved
QML and Qt Quick
-
I'm trying write a QML project with C++ objects exposed in it and I think i've configured my QtCreator wrong because my first use of Q_PROPERTY has a syntax error of "unexpected token '(' " and when I compile, i get "undefined reference to vtable for DbHost" (which is my C++ class name) I think i've configured my project wrong but I don't know how wrong. My project is in my githubrepo
-
Hi,
You’re not compiling all of your sources.
-
It’s not a Qt problem, you don’t list all the sources for your application. You have only put main.cpp.
-
As I already wrote, your CMakeList file is wrong. In add_executable, you are only listing main.cpp. So you are not compiling all your other classes hence the error you are getting.