简体   繁体   中英

How do I cross compile QT application from ubuntu to windows?

First I tried installing mingw and adding it to Qt creator's build kits, but I couldn't figure out how, and all the instructions I found on line just said it's easy without saying what to do.

Next I tried using mxe, and I just get linker errors, mostly to do with zlib and freetype, but the linker flags for both are there, and it doesn't say it can't find the libraries.

And while I can find similar errors in several stack overflow questions, none of them have answers. So I'm at a loss, how do I do this?

Rather than attempting to get cross-compiling working (which can be difficult, error prone and prone to failure when something changes), you should rather set up a build environment on all your target platforms (virtual machines work well for this) and then compile and package your product natively.

I know that this does not answer your question "as such", but it answers the question you should have asked. Just don't bother with cross-compilation, it's too much painful work. Just use a VM and get on with productive work :)

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