Niklas
Niklas

Reputation: 25443

Compile Qt Project on Windows for Linux / Mac

Is it possible to compile a Qt Project on Windows for Linux / Mac?

I am using Qt 5.0.2 with MinGW and Qt Creator.

Upvotes: 0

Views: 748

Answers (4)

Niklas
Niklas

Reputation: 25443

I finally did it with compiling and building it on each OS. It is too much effort doing it on Widnows.

Upvotes: 0

Dmitry Sazonov
Dmitry Sazonov

Reputation: 9014

In our organization we have 1 server with 3 virtual machines that are responsable for cross-platform building. I think that cross-compiling on one real OS may be used only for some kind of learning process, but not for real tasks.

Upvotes: 1

evilruff
evilruff

Reputation: 4085

For QT 4.* answer is YES, that's possible, I did that ones mainly for 'research purposes' and would not do it again ever.. It takes a lot of time, a lot of hacking bit's and pieces in makefiles, configurations.. There is no ANY practical sense in doing that. It takes 40 minutes to install Linux of your taste on a virtual machine (whatever you prefer) and get proper binaries.

Same applied for MacOSX.. never did it but again I believe it can be done by building a full tool-chain only question what for =))

Upvotes: 1

edwinc
edwinc

Reputation: 1675

i'm not saying it is impossible but it would be really hard. g++ could be tricked into generating object files but there are many linux libraries and headers that just don't exist on mingw. Linux apps are best built on linux itself.

Upvotes: 1

Related Questions