Target Mac OS on Windows development environment
-
I would like to create a desktop application that will run on Windows, Mac and Linux platforms. The application will NOT run on any mobile nor any embedded platforms. Is it possible to develop such an application using only a Windows development environment?
I ask because I do not see any build/kit options for neither Mac nor Linux using QT on a Windows development environment.
-
Hi and welcome to devnet,
Cross-compilation from any environment to macOS is at this time at least not possible but it's nothing Qt specific.
From Linux to Windows and vice-versa is possible using a dedicated MinGW cross-compiler but is not easily accomplished and you would have to cross-compile Qt also.
The most common way to work on Windows with regard to building for Linux is to have a Linux virtual machine. As for macOS, an Apple machine is mandatory but you might be able to find services that provides you build infrastructure but you still have the issue of testing your application visually.
-
@SGaist Thank you for replying. So what I take from this is that each targeted platform is easiest (best?) developed on each target's native platform. If that is the case, it seems that QT's claims of cross-platform development capabilities are to be taken with a grain of salt
. -
No at all, cross-platform means that you have one code base that you can build for all target platforms. The fact that you can't cross-compile to macOS is not a Qt limitation but a constraints that comes from Apple.
-
@SGaist Thank you for replying. So what I take from this is that each targeted platform is easiest (best?) developed on each target's native platform. If that is the case, it seems that QT's claims of cross-platform development capabilities are to be taken with a grain of salt
.Nothing is ever going to allow you to ship Applications for MacOS without a Mac. Even if you farm out the build to a CI service, you still need a Mac to actually run and test the App, reproduce bugs, etc. That's nothing unique to Qt. It's just inherent in the nature of cross platform development that you do actually need some sort of access to the platform you are targeting.
That said, if you are comfortable shipping binaries to end users that have never actually been tested by a person, check out https://circleci.com/build-environments/xcode/osx/ -- I have used their service for Linux CI builds in the past, and it's pretty convenient.