Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to deploy to mac from windows
Forum Updated to NodeBB v4.3 + New Features

How to deploy to mac from windows

Scheduled Pinned Locked Moved Solved General and Desktop
17 Posts 7 Posters 3.8k Views 2 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.
  • N nicholaslee
    22 Jul 2018, 14:11

    I've made an app, deployed it to windows and works perfectly.
    However, mac users are unable to download as .exe is unreadable.
    How do i deploy to mac from a windows computer?

    -Build& run using Qt 5.0.3 MinGW 32bit

    K Offline
    K Offline
    koahnig
    wrote on 22 Jul 2018, 14:23 last edited by aha_1980
    #2

    @nicholaslee

    You need to have a complete toolchain for macOS. Here is how to compile Qt for macOS..

    Not sure if you can cross-compile on windows for mavOS at all. Never heard of it, but I did not search for either. In general I would suggest to do the whole compilation on a Mac. This will probably save a lot of your hair. ;)

    [Edit iOS > macOS ~aha_1980]

    Vote the answer(s) that helped you to solve your issue(s)

    A 1 Reply Last reply 22 Jul 2018, 18:28
    3
    • K koahnig
      22 Jul 2018, 14:23

      @nicholaslee

      You need to have a complete toolchain for macOS. Here is how to compile Qt for macOS..

      Not sure if you can cross-compile on windows for mavOS at all. Never heard of it, but I did not search for either. In general I would suggest to do the whole compilation on a Mac. This will probably save a lot of your hair. ;)

      [Edit iOS > macOS ~aha_1980]

      A Offline
      A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on 22 Jul 2018, 18:28 last edited by
      #3

      Not sure if you can cross-compile on windows for mavOS at all.

      It would be a big surprise if that would be possible...

      Qt has to stay free or it will die.

      K 1 Reply Last reply 22 Jul 2018, 18:49
      2
      • A aha_1980
        22 Jul 2018, 18:28

        Not sure if you can cross-compile on windows for mavOS at all.

        It would be a big surprise if that would be possible...

        K Offline
        K Offline
        koahnig
        wrote on 22 Jul 2018, 18:49 last edited by
        #4

        @aha_1980 said in How to deploy to mac from windows:

        Not sure if you can cross-compile on windows for mavOS at all.

        It would be a big surprise if that would be possible...

        Wasn't sure, since I am not on Mac as you noticed ;)

        Vote the answer(s) that helped you to solve your issue(s)

        A 1 Reply Last reply 22 Jul 2018, 19:05
        0
        • K koahnig
          22 Jul 2018, 18:49

          @aha_1980 said in How to deploy to mac from windows:

          Not sure if you can cross-compile on windows for mavOS at all.

          It would be a big surprise if that would be possible...

          Wasn't sure, since I am not on Mac as you noticed ;)

          A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 22 Jul 2018, 19:05 last edited by
          #5

          @koahnig Neither am I :)

          Qt has to stay free or it will die.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 22 Jul 2018, 22:19 last edited by
            #6

            Hi,

            I confirm: you need a macOS machine to build for macOS. No cross-compilation possible.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            3
            • N Offline
              N Offline
              nicholaslee
              wrote on 23 Jul 2018, 17:13 last edited by
              #7

              @koahnig @aha_1980 haha yeah no cross compilation
              @SGaist Thank you for your reply. I borrowed a Mac and downloaded qt 4.7, tried to open the .pro file but this error message popped up. The qt creator version on my windows is 4.6.2, the code is pretty huge, if I update my windows qt creator to 4.7 will it screw up my codes? or is there another way to downgrade to 4.6.2 on the Mac?

              0_1532365542785_Screen Shot 2018-07-24 at 1.02.16 am.png

              A 1 Reply Last reply 23 Jul 2018, 17:18
              0
              • N nicholaslee
                23 Jul 2018, 17:13

                @koahnig @aha_1980 haha yeah no cross compilation
                @SGaist Thank you for your reply. I borrowed a Mac and downloaded qt 4.7, tried to open the .pro file but this error message popped up. The qt creator version on my windows is 4.6.2, the code is pretty huge, if I update my windows qt creator to 4.7 will it screw up my codes? or is there another way to downgrade to 4.6.2 on the Mac?

                0_1532365542785_Screen Shot 2018-07-24 at 1.02.16 am.png

                A Offline
                A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on 23 Jul 2018, 17:18 last edited by
                #8

                @nicholaslee

                The .pro.user file and its backup cannot be used on other systems, delete them. then open your project again

                the best way to handle projects on differen platform is by usin a VCS like git. it handles e.g. the different line endings for you.

                regards

                Qt has to stay free or it will die.

                V 1 Reply Last reply 24 Jul 2018, 11:05
                2
                • N Offline
                  N Offline
                  nicholaslee
                  wrote on 24 Jul 2018, 08:48 last edited by
                  #9

                  @aha_1980 I removed the .pro.user file and it was able to open qt and view the codes but when I try to build it, it gave me a whole bunch of errors. I've been working on this project for 3 months and my dateline is close but I can't deploy on Mac. Would really appreciate help from anyone thanks!
                  Build errors below:

                  In file included from ../IVLEdownloader/main.cpp:1:
                  In file included from ../../../Documents/QT/5.0.2/clang_64/include/QtWidgets/QtWidgets:4:
                  .
                  .
                  .

                  warning "This version of Mac OS X is unsupported"

                   ^
                  

                  13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register T tmp = load(_q_value);
                  ^~~~~~~~~
                  .
                  .
                  .

                  friend declaration specifying a default argument must be a definition
                  friend Q_CORE_EXPORT uint qHash(const QUrl &url, uint seed = 0) Q_DECL_NOTHROW;
                  ^
                  .
                  .
                  .
                  9 warnings and 5 errors generated.
                  make: *** [main.o] Error 1
                  16:36:35: The process "/usr/bin/make" exited with code 2.
                  Error while building/deploying project IVLEDownloader (kit: Desktop Qt 5.0.2 clang 64bit)
                  When executing step "Make"

                  J 1 Reply Last reply 24 Jul 2018, 09:02
                  0
                  • N nicholaslee
                    24 Jul 2018, 08:48

                    @aha_1980 I removed the .pro.user file and it was able to open qt and view the codes but when I try to build it, it gave me a whole bunch of errors. I've been working on this project for 3 months and my dateline is close but I can't deploy on Mac. Would really appreciate help from anyone thanks!
                    Build errors below:

                    In file included from ../IVLEdownloader/main.cpp:1:
                    In file included from ../../../Documents/QT/5.0.2/clang_64/include/QtWidgets/QtWidgets:4:
                    .
                    .
                    .

                    warning "This version of Mac OS X is unsupported"

                     ^
                    

                    13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                    register T tmp = load(_q_value);
                    ^~~~~~~~~
                    .
                    .
                    .

                    friend declaration specifying a default argument must be a definition
                    friend Q_CORE_EXPORT uint qHash(const QUrl &url, uint seed = 0) Q_DECL_NOTHROW;
                    ^
                    .
                    .
                    .
                    9 warnings and 5 errors generated.
                    make: *** [main.o] Error 1
                    16:36:35: The process "/usr/bin/make" exited with code 2.
                    Error while building/deploying project IVLEDownloader (kit: Desktop Qt 5.0.2 clang 64bit)
                    When executing step "Make"

                    J Offline
                    J Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on 24 Jul 2018, 09:02 last edited by
                    #10

                    @nicholaslee This is a warning, not error. What errors do you get? And what MacOS version and XCode version do you use? Which Qt version?

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    2
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 24 Jul 2018, 09:06 last edited by
                      #11

                      Qt 5.0.2 is more than outdated, please update to either the latest version available (currently Qt 5.11.1) or the latest LTS (currently Qt 5.9.6)

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      5
                      • N Offline
                        N Offline
                        nicholaslee
                        wrote on 24 Jul 2018, 09:22 last edited by
                        #12

                        @jsulm thanks for the help. The errors I'm getting are:

                        friend declaration specifying a default argument must be a definition
                        friend Q_CORE_EXPORT uint qHash(const QUrl &url, uint seed = 0) Q_DECL_NOTHROW;

                        friend declaration specifying a default argument must be a definition
                        friend uint qHash(const QPersistentModelIndex &, uint seed = 0);

                        friend declaration specifying a default argument must be the only definition
                        inline uint qHash(const QPersistentModelIndex &, uint seed);

                        'd' is a private member of 'QPersistentModelIndex'
                        { return qHash(index.d, seed); }

                        friend declaration specifying a default argument must be a definition
                        friend Q_NETWORK_EXPORT uint qHash(const QHostAddress &key, uint seed = 0);

                        My MacOS is high sierra version 10.13.6
                        Xcode version 9.4.1
                        QT version 4.7.0 based on QT 5.11.1

                        @SGaist Oh, its because I am working with an old code which was built using Qt 5.0.2. I worked on it and deployed to Windows, worked perfectly, is there anyway to still deploy it to Mac OS?

                        J 1 Reply Last reply 24 Jul 2018, 10:12
                        0
                        • N nicholaslee
                          24 Jul 2018, 09:22

                          @jsulm thanks for the help. The errors I'm getting are:

                          friend declaration specifying a default argument must be a definition
                          friend Q_CORE_EXPORT uint qHash(const QUrl &url, uint seed = 0) Q_DECL_NOTHROW;

                          friend declaration specifying a default argument must be a definition
                          friend uint qHash(const QPersistentModelIndex &, uint seed = 0);

                          friend declaration specifying a default argument must be the only definition
                          inline uint qHash(const QPersistentModelIndex &, uint seed);

                          'd' is a private member of 'QPersistentModelIndex'
                          { return qHash(index.d, seed); }

                          friend declaration specifying a default argument must be a definition
                          friend Q_NETWORK_EXPORT uint qHash(const QHostAddress &key, uint seed = 0);

                          My MacOS is high sierra version 10.13.6
                          Xcode version 9.4.1
                          QT version 4.7.0 based on QT 5.11.1

                          @SGaist Oh, its because I am working with an old code which was built using Qt 5.0.2. I worked on it and deployed to Windows, worked perfectly, is there anyway to still deploy it to Mac OS?

                          J Offline
                          J Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on 24 Jul 2018, 10:12 last edited by
                          #13

                          @nicholaslee said in How to deploy to mac from windows:

                          QT version 4.7.0 based on QT 5.11.1

                          This is QtCreator version, not Qt. Which Qt version do you really use? Check your Kit to find out.
                          From the build log you can clearly see that it is Qt 5.0.2 which is really old.

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • N Offline
                            N Offline
                            nicholaslee
                            wrote on 24 Jul 2018, 10:35 last edited by
                            #14

                            @jsulm oh yeah i'm using Qt 5.0.2 clang 64bit

                            J 1 Reply Last reply 24 Jul 2018, 10:38
                            0
                            • N nicholaslee
                              24 Jul 2018, 10:35

                              @jsulm oh yeah i'm using Qt 5.0.2 clang 64bit

                              J Offline
                              J Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on 24 Jul 2018, 10:38 last edited by
                              #15

                              @nicholaslee You should really try a newer Qt version first

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0
                              • A aha_1980
                                23 Jul 2018, 17:18

                                @nicholaslee

                                The .pro.user file and its backup cannot be used on other systems, delete them. then open your project again

                                the best way to handle projects on differen platform is by usin a VCS like git. it handles e.g. the different line endings for you.

                                regards

                                V Offline
                                V Offline
                                VRonin
                                wrote on 24 Jul 2018, 11:05 last edited by VRonin
                                #16

                                @aha_1980 said in How to deploy to mac from windows:

                                the best way to handle projects on differen platform is by usin a VCS like git. it handles e.g. the different line endings for you.

                                If you go down this route there are systems that allow you to deploy directly cross-platforms. The 2 most popular ones are Travis CI (for Linux and Mac) and Appveyor for windows. They are free if your project is open source

                                "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                                ~Napoleon Bonaparte

                                On a crusade to banish setIndexWidget() from the holy land of Qt

                                1 Reply Last reply
                                2
                                • N Offline
                                  N Offline
                                  nicholaslee
                                  wrote on 25 Jul 2018, 10:05 last edited by
                                  #17

                                  @jsulm @VRonin

                                  Oh, I found a solution. All I had to do is to go into terminal, to project folder and qmake and make. Thats all. Building from qt creator is not possible, not sure why. Anyways, thank you all for your help!

                                  1 Reply Last reply
                                  0

                                  11/17

                                  24 Jul 2018, 09:06

                                  • Login

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