Cross Compilation | SoloLearn: Learn to code for FREE!

+2

Cross Compilation

Any ideas on how to package an application (c++ app to be specific) in one system to be executed on another system. eg: like writing a c++ application on Linux and running it on windows. i wrote a Qt platform independent app on Linux, built it there too, but i also want to run that app on windows without re-compiling it. there's this packaging tool called GUB (GRAND UNIFIED BUILDER) but i don't know how to use it or if it can do what i want.

9/9/2018 6:00:44 AM

Zion Coder

2 Answers

New Answer

+6

While code can be platform-independent, executables may not be, since different operating systems interpret it differently. Not to mention, different OSes have different architecture. C++ is "cross-platform" in the "write once, compile everywhere" sense, unlike Java's (with the help of JVM) "compile once, run everywhere". A solution for building a cross-platform executable file using C++ probably exists, but I'm not aware of it.

+2

Hatsy Rei thanks for the heads up.