Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-13-2009, 12:58 AM   #1
LQ Newbie
Registered: Dec 2009
Posts: 2

Rep: Reputation: 0
making a cross compiler


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

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.

Last edited by natali; 12-13-2009 at 01:05 AM.
Old 12-13-2009, 06:48 PM   #2
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927
Hi, welcome to LQ!

Which part do you have difficulty with?

Old 12-15-2009, 03:02 AM   #3
LQ Newbie
Registered: Dec 2009
Posts: 2

Original Poster
Rep: Reputation: 0
i succeeded making the cross compiler.
(l used this link
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 run this:
./configure -arch arm -xplatform /usr/share/qt4/mkspecs/linux-g++ -force-pkg-config

and this is what i got:

sb2 g++ -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DELF_INTERPRETER=\"/lib64/\" -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/usr/share/qt4/mkspecs/linux-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared -x c++-header -c global/qt_pch.h -o .pch/release-shared/QtCore.gch/c++
sb2 g++ -c -include .pch/release-shared/QtCore -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DELF_INTERPRETER=\"/lib64/\" -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/usr/share/qt4/mkspecs/linux-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared -o .obj/release-shared/qabstractanimation.o animation/qabstractanimation.cpp
In file included from animation/qabstractanimation.cpp:855:
../../include/QtCore/qatomic_x86_64.h: In destructor 'QWeakPointer<T>::~QWeakPointer() [with T = QAbstractAnimation]':
../../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??




Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
My c compiler doesn't work after the cross-compiler installed Linux - Newbie 1 06-05-2007 04:55 AM
Cross compiler !!! hiteshmaisheri Linux - Laptop and Netbook 3 03-05-2005 10:51 AM
cross compiler leonora Programming 2 01-08-2005 12:13 PM
Cross compiler help please daveschile Linux - Software 1 04-09-2004 08:24 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:52 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration