Results 1 to 3 of 3

Thread: problems with making cross compiler

  1. #1
    Join Date
    Oct 2009
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default problems with making cross compiler

    hello!

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


    http://labs.trolltech.com/blogs/2009...mpiling-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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: problems with making cross compiler

    To export a variable, you have to use a proper shell command. For bash it is called "export":
    bash Code:
    1. export SOMEVAR=somevalue
    To copy to clipboard, switch view to plain text mode 
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Oct 2009
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: problems with making cross compiler

    thank you!

    i succeeded making the cross compiler.
    (l used this link http://labs.trolltech.com/blogs/2009...mpiling-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

Similar Threads

  1. Qt Embedded cross compiler make fails
    By quado player in forum Installation and Deployment
    Replies: 0
    Last Post: 1st September 2009, 14:22
  2. Cross compiler in Linux
    By vincat in forum Qt Programming
    Replies: 1
    Last Post: 11th June 2009, 07:14
  3. Weird Cross Platform Printing Problems
    By igor in forum Qt Programming
    Replies: 7
    Last Post: 7th August 2007, 16:25

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.