How to build on different platforms
-
Hello, I made a project. I am using Ubuntu 22.04 and I built it in this environment and it works on Linux operating system. Likewise, I want this project to be used on Windows, Android and IOS. How can I create build files suitable for these platforms in the QT Creator environment?
-
@serkan_tr
For Windows: easiest way is to use a Windows machine (can be a virtual machine). Install compiler and Qt for this compiler there and what else you need. You can use MinGW as compiler, it can be installed using Qt Online Installer.For iOS: you have to do that on a Mac because it can be only done using MacOS. Install XCode and Qt for iOS and build. See https://doc.qt.io/qt-6/ios.html
Android: install Qt for Android, NDK and Android SDK and build. See https://doc.qt.io/qt-6/android.html
-
@jsulm I understand. Thank you for your answer. Actually, I don't want to install Windows vs MAC, I was wondering if QT Creator could provide this directly. But it can't provide it, I guess I have to install it. As far as I understand, the build I will make on my Linux computer will be valid for Linux and Android.
As far as I understand, the build I will make on my Linux computer will be valid for Linux and Android (when I install the Android SDK). -
@serkan_tr Yes, you can build for Android on your Linux machine.
You could also build for Windows on your Linux machine, but this is way harder to set up. You will have to install MinGW and then build Qt from sources using it. Afterwards you can use MinGW as compiler and that Qt build to build your app for Windows. -
S serkan_tr has marked this topic as solved on