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. Deploying for Windows and Mac
Qt 6.11 is out! See what's new in the release blog

Deploying for Windows and Mac

Scheduled Pinned Locked Moved Installation and Deployment
8 Posts 3 Posters 4.2k Views 1 Watching
  • 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.
  • F Offline
    F Offline
    fs_tigre
    wrote on last edited by
    #1

    Hi,

    I have created a small little app on a Mac and I was wondering what would be the steps to compile this little application to create an executable file for Windows.

    I actually copied the two folders where the project resides to my Windows machine but as expected I got an error.

    bq. Error while building project applicationName(target: Desktop)
    When executing build step 'qmake'

    What would be the proper procedure to create an .exe file for Windows after creating the app on a Mac?

    Thanks a lot for your help!

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

      Just copying in the folder probably means that you copied all kinds of temporary files created by the Mac build along with the source code. This will not work (tm). For example, Makefiles generated on Mac for the Mac C++ compiler will not work at all on Windows.

      Firstly, you need to clean the source directory before copying the files over (side note: Dude, get a source code repo, there is Github and tons of other free options!).

      Then run qmake on Windows on the .pro file to generate Windows build files. How to do that depends on your compiler and setup. See http://qt-project.org/doc/qt-4.8/qmake-tutorial.html for how to use QMake.

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

      1 Reply Last reply
      0
      • F Offline
        F Offline
        fs_tigre
        wrote on last edited by
        #3

        Thank you for your reply.

        This is how I did it.

        1-Created a new project in my Windows machine.
        2-Copied the files from the project created on the Mac (main.cpp,mainwindow.cpp, mainwindow.ui etc ) and replaced the files in the Windows machine, and it did the trick.

        bq. Firstly, you need to clean the source directory before copying the files over (side note: Dude, get a source code repo, there is Github and tons of other free options!).

        I do have an account but I have never use it because I don't see how this could help me if I'm not collaborating with any body, in fact I don't even know how to use Github.

        Excuse my ignorance but what would be the benefit of using Github?

        Can you please give me a quick explanation on how you use Github?

        Thanks a lot

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

          The benefit of using a repository is that there is a managed process of working with multiple setups and tracking changes done for the different target platforms. It is one of the first things to learn when developing code, just as important as the coding itself.

          For an introduction to Github, see http://learn.github.com/p/intro.html

          By the way, your initial error message looks like QMake is not in the path.

          [Edit: Fixed path by removing . from the end; mlong]

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

          1 Reply Last reply
          0
          • F Offline
            F Offline
            fs_tigre
            wrote on last edited by
            #5

            Thanks a lot for your help!

            I will give it a try. For some reason the link doesn't work, but I guess my homework is to find good tutorials.

            Thanks

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mlong
              wrote on last edited by
              #6

              The link should work now.

              Software Engineer
              My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

              1 Reply Last reply
              0
              • F Offline
                F Offline
                fs_tigre
                wrote on last edited by
                #7

                I apreciate it. Thanks a lot!

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

                  Oops, sorry for the messed up path. Thanks, @mlong!

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

                  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