Solved How to deploy to mac from windows
-
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
-
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]
-
Not sure if you can cross-compile on windows for mavOS at all.
It would be a big surprise if that would be possible...
-
@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 ;)
-
@koahnig Neither am I :)
-
Hi,
I confirm: you need a macOS machine to build for macOS. No cross-compilation possible.
-
@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? -
The
.pro.user
file and its backup cannot be used on other systems, delete them. then open your project againthe 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
-
@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" -
@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?
-
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)
-
@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?
-
@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. -
@jsulm oh yeah i'm using Qt 5.0.2 clang 64bit
-
@nicholaslee You should really try a newer Qt version first
-
@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
-