PDA

View Full Version : undefined reference to `QInotifyFileSystemWatcherEngine::create()'



Shum
18th January 2011, 09:23
Hello.
I'm trying to compile a qt-embedded program using qmake but I'm getting the error:
libQtCore.so: undefined reference to `QInotifyFileSystemWatcherEngine::create()'

Looking through the source code it seems the file system watcher stuff is only compiled if QT_NO_FILESYSTEMWATCHER is not defined. In qfeatures.h QT_NO_FILESYSTEMWATCHER is defined if QT_NO_THREAD is defined.

To configure qt I'm running:

./configure \
-opensource \
-release \
-embedded x86 \
-xplatform qws/i686-pc-linux-gnu-g++ \
-prefix /usr/crossdev/usr/local/Trolltech/QtEmbedded-4.5.3 \
-dbus \
-ldbus-1 \
-no-sql-psql \
-no-qt3support \
-no-phonon \
-no-phonon-backend \
-no-svg \
-no-webkit \
-no-scripttools \
-no-gif \
-no-libtiff \
-qt-libpng \
-qt-libmng \
-qt-libjpeg \
-no-openssl \
-nomake "examples demos docs" \
-v \
-no-nis \
-no-cups \
-no-opengl \
-depths 1,4,8,16,18,24 \
-no-rpath

But this generates makefiles for qmake that include -DQT_NO_THREAD in CPPFLAGS.

So my question is: how should I be using configure so that qmake DOESN'T compile with QT_NO_THREAD defined and I can use the filesystem watcher stuff my program seems to need.

Added after 23 minutes:

Also, passing -feature-thread to configure doesn't solve the problem.

germano
24th January 2011, 19:37
Having the same problem here. Got this in another forum:

"When creating the mkspec for a embedded target if the name of the directory does not match "linux-*" then the following build error will be seen.
undefined reference to `QDnotifyFileSystemWatcherEngine::create()'
see also:
http://doc.trolltech.com/4.4/qt-embedded-crosscompiling.html#step-2-create-a-target-specific-qmake-specification"

I dont know yet if it will solve the problem because it is still compiling here. But I didnt want to postpone the reply since I could forget.