rbtLong
rbtLong

Reputation: 1572

Qt5 undefined reference to `QDeclarativeDebuggingEnabler::QDeclarativeDebuggingEnabler()'

Suddenly had this problem...

classitem.o: In function `__static_initialization_and_destruction_0':
/../../Qt/5.4/gcc_64/include/QtDeclarative/qdeclarativedebug.h:50: undefined reference to `QDeclarativeDebuggingEnabler::QDeclarativeDebuggingEnabler()'
collect2: error: ld returned 1 exit status
make: *** [MedJournal] Error 1
09:29:05: The process "/usr/bin/make" exited with code 2.

went as far as stripping the QObject class from the object, but still got the same error.

Upvotes: 0

Views: 1595

Answers (2)

Kai Schubert
Kai Schubert

Reputation: 91

Remember there is a difference between QtQuick1 and QtQuick2 when enabling debugging:

QtQuick1

#include <QtDeclarative/qdeclarativedebug.h>
QDeclarativeDebuggingEnabler enabler;

QtQuick2

#include <QQmlDebuggingEnabler>
QQmlDebuggingEnabler enabler;

Since you are using Qt5.4 and QtQuick2 is arround since Qt5 I think, that might be the issue.

Upvotes: 1

rbtLong
rbtLong

Reputation: 1572

It turns out that for some reason this line was causing all the trouble:

#include <QtDeclarative/QDeclarativeView>

Upvotes: 0

Related Questions