PDA

View Full Version : qmake_image_collection.cpp gives me a compiling error



vfernandez
31st January 2006, 01:11
When I include any image (using IMAGES+=... in src.pro) on my QT 4 project I get a compiling error in the qmake_image_collection.cpp generated by uic:


g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include -I. -I. -o qmake_image_collection.o qmake_image_collection.cpp
qmake_image_collection.cpp:16:27: error: q3mimefactory.h: File or directory does not exist
qmake_image_collection.cpp:17:26: error: q3dragobject.h: File or directory does not exist
qmake_image_collection.cpp: In function ‘QImage uic_findImage(const QString&)’:
qmake_image_collection.cpp:167: error: ‘BigEndian’ is not a member of ‘QImage’
qmake_image_collection.cpp:171: error: ‘class QImage’ has no member named ‘setAlphaBuffer’
qmake_image_collection.cpp: At global scope:
qmake_image_collection.cpp:179: error: expected class-name before ‘{’ token
qmake_image_collection.cpp: In member function ‘const QMimeSource* MimeSourceFactory____bin_siouk::data(const QString&) const’:
qmake_image_collection.cpp:184: error: ‘Q3MimeSourceFactory’ has not been declared
qmake_image_collection.cpp:188: error: ‘Q3MimeSourceFactory’ was not declared in this scope
qmake_image_collection.cpp:188: error: expected primary-expression before ‘)’ token
qmake_image_collection.cpp:188: error: expected `)' before ‘this’
qmake_image_collection.cpp:189: error: ‘Q3MimeSourceFactory’ has not been declared
qmake_image_collection.cpp: At global scope:
qmake_image_collection.cpp:193: error: expected initializer before ‘*’ token
qmake_image_collection.cpp: In function ‘void qInitImages____bin_siouk()’:
qmake_image_collection.cpp:197: error: ‘factory’ was not declared in this scope
qmake_image_collection.cpp:199: error: ‘Q3MimeSourceFactory’ has not been declared
qmake_image_collection.cpp:199: error: ‘defaultFactory’ was not declared in this scope
qmake_image_collection.cpp: In function ‘void qCleanupImages____bin_siouk()’:
qmake_image_collection.cpp:205: error: ‘factory’ was not declared in this scope
qmake_image_collection.cpp:206: error: ‘Q3MimeSourceFactory’ has not been declared
qmake_image_collection.cpp:206: error: ‘defaultFactory’ was not declared in this scope
qmake_image_collection.cpp:207: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
make[1]: *** [qmake_image_collection.o] Error 1
make[1]: Leaving directory `/home/djworld/Programación/PFC/siouk/src'
make: *** [sub-src-make_default] Error 2

I have a fresh installation of QT 4.1 compiled by myself under /usr/lib/qt4. Of course I've set QTDIR to that directory and included it in the PATH. I also tried earlier with precompiled packages for SUSE 10.0 (which I'm using) getting the same error. I don't understand why this happens. Any idea?

jacek
31st January 2006, 01:27
qmake_image_collection.cpp:16:27: error: q3mimefactory.h: File or directory does not exist
qmake_image_collection.cpp:17:26: error: q3dragobject.h: File or directory does not exist
It looks like it tries to use Qt3 support module, try adding "QT += qt3support" to your .pro file. You can also use resources instead, if you prefer pure Qt4 solution.

vfernandez
31st January 2006, 02:42
Thanks! Now it works! Adding "QT += qt3support" made it compile but I prefer the second option. I've created a .qrc file and added it to src.pro with "RESOURCES += src.qrc" and now the icons work. Cool! :) The only problem is KDevelop doesn't seem to support "RESOURCES", so I have to manually edit the src.pro to add it til the next release of KDevelop is out.