PDA

View Full Version : problems with making cross compiler



nataly
13th December 2009, 06:02
hello!

i'm trying to make a cross compiler with the instructions in this link:


http://labs.trolltech.com/blogs/2009/09/10/cross-compiling-qtx11/

i built angsrom and created scratchbox2

after the topic "Cross compiling Qt/X11" in the link:

i changed the qmake.conf like they say.
than, the instructions say:

you can export PKG_CONFIG_PATH to point to your targets

pkg-config (.pc) files, which are normally in a pkg-config directory under

the targets lib directory:
$targetPathOnHost/usr/lib/pkgconfig. Please note this path must be fully

qualified relative to the host)

i dont understand how do i do this.
thanks.

wysota
13th December 2009, 09:02
To export a variable, you have to use a proper shell command. For bash it is called "export":
export SOMEVAR=somevalue

nataly
15th December 2009, 06:44
thank you!

i succeeded making the cross compiler.
(l used this link http://labs.trolltech.com/blogs/2009/09/10/cross-compiling-qtx11/)
now i have other problem.

I tried to use the cross compiler. i can build a project to intel,
but when i tried to build to arm , it didn't recognize the libs of qt.
i changed the path in the qt creator - in the build steps ---> additional arguments by :

-spec (and i wrote the path to the new qmake.conf which i did)
and this is what i got in the compile output:

Running build steps for project hello...
Configuration unchanged, skipping QMake step.
Starting: /usr/bin/make -w
make: Entering directory `/home/gt/Desktop/hello'
sb2 g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -o hello.o hello.cpp
hello.cpp:1:24: error: QApplication: No such file or directory
hello.cpp:2:18: error: QLabel: No such file or directory
hello.cpp: In function ‘int main(int, char**)’:
hello.cpp:6: error: ‘QApplication’ was not declared in this scope
hello.cpp:6: error: expected `;' before ‘app’
hello.cpp:7: error: ‘QLabel’ was not declared in this scope
hello.cpp:7: error: ‘label’ was not declared in this scope
hello.cpp:7: error: expected type-specifier before ‘QLabel’
hello.cpp:7: error: expected `;' before ‘QLabel’
hello.cpp:9: error: ‘app’ was not declared in this scope
hello.cpp: At global scope:
hello.cpp:4: warning: unused parameter ‘argc’
hello.cpp:4: warning: unused parameter ‘argv’
make: Leaving directory `/home/gt/Desktop/hello'
make: *** [hello.o] Error 1
Exited with code 2.
Error while building project hello
When executing build step 'Make'

than i tried in the command line to ran this:
./configure -arch arm -xplatform /usr/share/qt4/mkspecs/linux-g++ -force-pkg-config
make

and this is what i got:

../../include/QtCore/qatomic_x86_64.h:133: error: impossible constraint in 'asm'
make[1]: *** [.obj/release-shared/qabstractanimation.o] Error 1
make[1]: Leaving directory `/home/gt/qtsdk-2009.05/qt/src/corelib'
make: *** [sub-corelib-make_default-ordered] Error 2

how can i make this to recognize qt's libs??


thanks!

Nataly