maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Error in compiling QT project under DIABLO_ARMEL (https://talk.maemo.org/showthread.php?t=43386)

closedeed 2010-02-04 16:03

Error in compiling QT project under DIABLO_ARMEL
 
I have tried to compile qt project under DIABLO_ARMEL., but get errors:

Commands: >qmake -project
>qmake ./testapp.pro
>make

Console answer:
g++ -Wl,-O1 -o testapp testapp.o -L/usr/lib -lQtGui -lQtCore -lpthread
/scratchbox/compilers/cs2005q3.2-glibc2.5-arm/bin/../lib/gcc/arm-none-linux-gnueabi/3.4.4/../../../../arm-none-linux-gnueabi/bin/ld: testapp.o: Relocations in generic ELF (EM: 3)
/scratchbox/compilers/cs2005q3.2-glibc2.5-arm/bin/../lib/gcc/arm-none-linux-gnueabi/3.4.4/../../../../arm-none-linux-gnueabi/bin/ld: testapp.o: Relocations in generic ELF (EM: 3)
testapp.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [testapp] Error 1


Target settings is:

>sb-conf show DIABLO_ARMEL
Compiler: cs2005q3.2-glibc2.5-arm
Devkits: perl debian-etch maemo3-tools cputransp
CPU-transparency: /scratchbox/devkits/cputransp/bin/qemu-arm-0.8.2-sb2

This code under DIABLO_X86 works good. Qt libs: libqt4-core, libqt4-dev and libqt4-gui installed.
Help please, what can be a problem?

closedeed 2010-02-05 14:23

Re: Error in compiling QT project under DIABLO_ARMEL
 
This error:
testapp.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [testapp] Error 1


occured if project was compiled before for anothe platform. It's need command: 'make claen' and after that: 'make'.

timoph 2010-02-05 18:36

Re: Error in compiling QT project under DIABLO_ARMEL
 
Quote:

Originally Posted by closedeed (Post 511909)
This error:
testapp.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [testapp] Error 1


occured if project was compiled before for anothe platform. It's need command: 'make claen' and after that: 'make'.

If you also need to get rid of the generated makefiles you need to run
Code:

make distclean
After the you need to run qmake again to generate the makefiles before building it like
Code:

qmake && make


All times are GMT. The time now is 06:05.

vBulletin® Version 3.8.8