Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to compile a QT Application targeting for LINUX from a Windows machine

How to compile a QT Application targeting for LINUX from a Windows machine

Scheduled Pinned Locked Moved Installation and Deployment
16 Posts 7 Posters 22.8k Views
  • 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.
  • M Offline
    M Offline
    miroslav
    wrote on last edited by
    #7

    [quote author="veeraps" date="1334820343"]I am not whether Qt SDK provides the cross compilation environment yet.[/quote]
    It does not, and also I think that would not make much sense. Even if the source code compiles for Linux, how could it be verified to run?
    From a complexity point of view, I think setting up a Linux machine (VM or not) and the necessary environment for Qt is a whole lot simpler than cross compiling bug hunting afterwards.

    Mirko Boehm | mirko@kde.org | KDE e.V.
    FSFE Fellow
    Qt Certified Specialist

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #8

      Added the fact that you will need a real target environment to finally test your application, won't you?

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Punit_Tak
        wrote on last edited by
        #9

        "this can be a worst solution" but Qt Creator provides shadow build functionality which can be used to build source for multiple targets.

        bq. The same source code built for and running on multiple targets. Qt Creator allows developers to specify separate build settings for each development platform and to quickly switch between build targets. By default, shadow builds are used to keep the build specific files separate from the source. Developers can create separate versions of project files to keep platform-dependent code separate. They can use qmake scopes to select the file to process depending on which platform qmake is run on.

        Quote reference: "Qt Creator Whitepaper":http://qt-project.org/wiki/QtCreatorWhitepaper

        Punit Tak

        1 Reply Last reply
        0
        • M Offline
          M Offline
          miroslav
          wrote on last edited by
          #10

          What we are trying to say is that while it is possible to solely cross-compile, it is probably not a good way to get the program to actually run properly. But I think the answer is that no Linux cross compiler comes with Qt Creator for Windows, so you will have to get it from somewhere else.

          Mirko Boehm | mirko@kde.org | KDE e.V.
          FSFE Fellow
          Qt Certified Specialist

          1 Reply Last reply
          0
          • J Offline
            J Offline
            JothiMurugeswaran
            wrote on last edited by
            #11

            Can you provide some names of good cross-compiler with compilation steps.

            1 Reply Last reply
            0
            • J Offline
              J Offline
              JothiMurugeswaran
              wrote on last edited by
              #12

              Hi Miroslav,

              The reason why i am trying to use the Windows machine is, we have license only for building qt in windows machine with target for multiple OS. Because of this, i am not looking into the compilation with Linux machine.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                miroslav
                wrote on last edited by
                #13

                Hi Jothi,

                [quote author="JothiMurugeswaran" date="1335497329"]The reason why i am trying to use the Windows machine is, we have license only for building qt in windows machine with target for multiple OS. Because of this, i am not looking into the compilation with Linux machine.[/quote]

                That sounds strange. Nobody uses the commercial Qt license these days unless they have to. Unless there are concrete legal reasons that prevent it, you can use the LGPL Qt version on Linux. It actually comes out of the box on most distributions.

                Mirko Boehm | mirko@kde.org | KDE e.V.
                FSFE Fellow
                Qt Certified Specialist

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  andre
                  wrote on last edited by
                  #14

                  Strange indeed. I doubt you got yourself a Qt license that does not permit you to build your *nix binaries on *nix itself, but does permit the same on windows. If that's your interperttation of the license, I suggest you read it again and/or contact Digia for an explanation.

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    miroslav
                    wrote on last edited by
                    #15

                    Hi Jothi,

                    [quote author="JothiMurugeswaran" date="1335497167"]Can you provide some names of good cross-compiler with compilation steps.[/quote]

                    I doubt you will have success with that here. It is simply something nobody ever does. And building a cross-compiler is not exactly a piece of cake.

                    Mirko Boehm | mirko@kde.org | KDE e.V.
                    FSFE Fellow
                    Qt Certified Specialist

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      goetz
                      wrote on last edited by
                      #16

                      [quote author="JothiMurugeswaran" date="1335497329"]Hi Miroslav,

                      The reason why i am trying to use the Windows machine is, we have license only for building qt in windows machine with target for multiple OS. Because of this, i am not looking into the compilation with Linux machine.[/quote]

                      If you're not allowed to build Qt on a Linux machine, then I seriously doubt that you can build on a Windows machine for a Linux target. Cross compiling falls into the same category as running a Linux VM on the Windows box - just IMHO, I'm not a lawyer. If in doubt, contact Digia, as stated already.

                      http://www.catb.org/~esr/faqs/smart-questions.html

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved