Results 1 to 2 of 2
I have downloaded embedded QT 4.5.2 source code and tried to compile in RHEL 5.3 with 2.6.18 kernel. I tried to create static libraries for x86 platform. I have got ...
- 12-21-2009 #1Just Joined!
- Join Date
- Dec 2009
- Posts
- 5
Embedded QT 4.5.2 compilation error in RHEL 5.3
I have downloaded embedded QT 4.5.2 source code and tried to compile in RHEL 5.3 with 2.6.18 kernel. I tried to create static libraries for x86 platform. I have got the following error.
gmake[3]: Entering directory `/home/saravana/qt-embedded-linux-opensource-src-4.5.2/examples/desktop/screenshot'
g++ -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.5.2-generic/lib -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.5.2-generic/lib -o screenshot .obj/release-static-emb-auto/main.o .obj/release-static-emb-auto/screenshot.o .obj/release-static-emb-auto/moc_screenshot.o -L/home/saravana/qt-embedded-linux-opensource-src-4.5.2/lib -lQtGui -L/home/saravana/qt-embedded-linux-opensource-src-4.5.2/lib -lQtNetwork -lQtCore -lm -lrt -ldl -lpthread
obj/release-static-emb-auto/screenshot.o: In function `Screenshot::saveScreenshot()':
screenshot.cpp:(.text+0xb9): undefined reference to `QBasicAtomicInt_fetchAndAddOrdered(int volatile*, int)'
screenshot.cpp:(.text+0xd2): undefined reference to `QBasicAtomicInt_fetchAndAddOrdered(int volatile*, int)'
screenshot.cpp:(.text+0xed): undefined reference to `QBasicAtomicInt_fetchAndAddOrdered(int volatile*, int)'
screenshot.cpp:(.text+0x10e): undefined reference to `QBasicAtomicInt_fetchAndAddOrdered(int volatile*, int)'
screenshot.cpp:(.text+0x12f): undefined reference to `QBasicAtomicInt_fetchAndAddOrdered(int volatile*, int)'
.obj/release-static-emb-auto/screenshot.o:screenshot.cpp:(.text+0x203): more undefined references to `QBasicAtomicInt_fetchAndAddOrdered(int volatile*, int)' follow
collect2: ld returned 1 exit status
gmake[3]: *** [screenshot] Error 1
gmake[3]: Leaving directory `/home/saravana/qt-embedded-linux-opensource-src-4.5.2/examples/desktop/screenshot'
gmake[2]: *** [sub-screenshot-make_default-ordered] Error 2
gmake[2]: Leaving directory `/home/saravana/qt-embedded-linux-opensource-src-4.5.2/examples/desktop'
gmake[1]: *** [sub-desktop-make_default] Error 2
gmake[1]: Leaving directory `/home/saravana/qt-embedded-linux-opensource-src-4.5.2/examples'
gmake: *** [sub-examples-make_default-ordered] Error 2
Is there anyway to get around this and compile rest of the package?
The configuration I used is
./configure -static -platform /home/saravana/qt-embedded-linux-opensource-src-4.5.2/mkspecs/linux-g++ -xplatform /home/saravana/qt-embedded-linux-opensource-src-4.5.2/mkspecs/qws/linux-x86-g++
for x86 platform.
- 12-21-2009 #2Linux Newbie
- Join Date
- Sep 2005
- Location
- CZ
- Posts
- 164
Linker says that it cannot find a function named QBasicAtomicInt_fetchAndAddOrdered. According to a quick search on the Google, it should be defined in the file qatomic_generic.h.
I suggest to tell linker where the header (or implementation) file resides.
A quick patch is also to define
int QBasicAtomicInt_fetchAndAddOrdered(volatile int *, int){}
somewhere on the begin of the file screenshot.cpp. But I don't believe that this is what you want.
Didn't configure complain about missing dependencies somewhere in its output?


Reply With Quote