Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Build qmake to compile with Windows for Linux

    General and Desktop
    qmake
    1
    1
    883
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      PhTe last edited by

      I have a QT 5.4.1 installation on my Linux System (ARM cpu, qt in folder /media/data/qt5.4.1 ) and i want to write my applications in window.
      So i have to configure and build qmake in windows to create matching makefiles for my ARM system.
      My folder structure looks like:
      C:/Qt/Qt5.4.1/5.4/arm_linux
      -- bin Here are the qmake, moc, rcc, and all other exe files (mostly copied from the QT5.4.1 windows version)
      -- imports
      -- include
      -- lib
      -- mkspecs
      -- phrasebooks
      -- plugins
      -- qml
      -- sysroot The complete sysroot from my target system (qt installed to /media/data/qt5.4.1)
      -- translations

      I tried
      configure -prefix /media/data/qt5.4.1 -debug -device linux-imx6-g++ -platform win32-g++ -device-option CROSS_COMPILE=arm-linux-gnueabihf- -device-option QT_SYSROOT=C:/Qt/Qt5.4.1/5.4/arm_linux/sysroot -opensource -confirm-license -sysroot C:/Qt/Qt5.4.1/5.4/arm_linux/sysroot -o-c++11 -skip webkit -gui -widgets -shared -nomake tests -no-opengl

      qmake is compiled, but it searches to moc.exe and all the other binaries in the folder
      C:/Qt/Qt5.4.1/5.4/arm_linux/sysroot/media/data/qt5.4.1
      not in
      C:/Qt/Qt5.4.1/5.4/arm_linux/bin

      If i execute configure with -prefix C:/Qt/Qt5.4.1/5.4/arm_linux qmake searches the binaries in
      C:/Qt/Qt5.4.1/5.4/arm_linux/sysroot/Qt/Qt5.4.1/5.4/arm_linux/bin

      If i execute configure without the -prefix argument qmake searches the binaries in
      C:/Qt/Qt5.4.1/5.4/arm_linux/qtbase/bin/qt5.4.1

      Which is both useless...

      I also tried to create a qt.conf file in C:/Qt/Qt5.4.1/5.4/arm_linux/bin with

      [EffectivePaths]
      Prefix=..
      Binaries=C:/Qt/Qt5.4.1/5.4/arm_linux/bin
      

      But qmake seems to ignores the file. I looked a the persistent values with qmake -query, but they did not changed.

      The -set option in qmake can't be used, because i use different QT versions in different folders. As far as i know the persistent values are stored in the windows registry and then they would be used by the qmakes from the other QT versions too which would lead me to wrong pathes there.

      So how can i create a qmake which uses the binaries (moc.exe, rcc.exe, ...) from C:/Qt/Qt5.4.1/5.4/arm_linux/bin and all other (includes / libs) from the sysroot folder?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post