How to make exe for windows using .pro project file in qt in linux machine ?
Hello,
I am new to QT.
I have developed QT GUI application on linux using QT 5.0 and i want to generate exe for windows using executable in QT 5.0.
How to cross-compile.pro project file which is in linux in qt 5.0.2 for windows environment to work as a exe without any error ?
Is there MinGW compiler do we need to detect it in linux machine using qt 5.0 ?
Can you please guide me it is very urgent.
Re: How to make exe for windows using .pro project file in qt in linux machine ?
If it is urgent then you are far better off finding a Windows machine, installing the Qt SDK on Windows, and building from source code there.
The alternative is:
- Build a MingW cross-compiler tool chain
- Build any libraries, including Qt, your application needs using the cross compiler
- Configure Qt, your IDE, and your project to use the cross compiler
- Build your application using the cross compiler
MXE (M cross environment) may help you do some of this.
Then you still need a Windows machine to run and test it, which brings me back to my opening point.
1 Attachment(s)
Re: How to make exe for windows using .pro project file in qt in linux machine ?
Yes, so for that we need to either install QT SDK on windows machine and build source code from windows qt application.
Another alternative, as you have suggested, I tried to install Mingw64 bit on linux machine and when in qt 5.0 when I tried to add "Compilers" tab in "Build and run" option
in "/usr/lib64/ccache/x86_64-w64-mingw32-g++" and added Mingw there.
But, when i tried to set "Kits" option as MIngw and set Compiler as "Mingw" and Qt version as "Qt 5.0.2 GCC 64 bit", but Mingw compiler does not detect in qt 5.0 in linux machine.
Attachment 9006
So, what i should do to resolve this( to detect Mingw compiler) in linux machine in qt 5.0?
Re: How to make exe for windows using .pro project file in qt in linux machine ?
You need to build Qt with the MingW cross compiler and select that version of Qt. You cannot use the cross compiler with a set of Qt libraries built for your system's native environment.
I'll say it again: If it is urgent then you are far better off finding a Windows machine, installing the Qt SDK on Windows, and building from source code there.
Re: How to make exe for windows using .pro project file in qt in linux machine ?
Run VirtualBox in Linux. And install Windows+QtSDK