简体   繁体   中英

Running Qt application built for Linux, on windows

I have a Qt application which I built on Linux. I would like to run the same application on Windows. Is it possible? If yes, how? The Qt application software that I downloaded and used, is version 4.7.4.

Is it possible? If yes, how?

Yes, it is possible if the application is cross-compiled for Windows target on Linux.

You would need to have the mingw compiler installed on the Linux box when building the application for Windows. You would also need to make sure to use the proper `-mkspec- option for qmake.

If this is missed while building the application on Linux, it is probably not cross-compiling, so you would not be able to run the code on Windows off-hand unless you have a virtual machine installed for Linux, in which case you could do it, for sure.

You can install a Windows alongside your Linux and install VS2010 and Qt 4.8.* libraries for windows and compile your project there. You may need to make some changes to your source code in order to be compatible with Qt 4.8.* .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM