Cross-platform cross-compiler C ++

How can I build a cross compiler for a C ++ library to target many platforms on a single build server?

The cross-compiler should be able to create a library (at least) {Windows 7, Mac OS X, Ubuntu 11.04} Γ— {32 bit, 64 bit} Γ— {Debug, release}. I don't care that the whole build from scratch is taken forever or if the gcc binary is 1 GB. If the cross-compiler cannot be one executable, what workflow should I use to compile (and recompile) my library?

The host machine will be Ubuntu 11.04.

+6
source share
2 answers

The building cross-compiler is pretty well covered in the OSDev Wiki . For Windows, you can use mingw packages in your storage registry

+4
source

Windows host + TeamCity + GCC (mingw) + Gnu Make (or add-on for building the script) + MSVC8 / 9

You can force teamcity to automate everything for you, GCC will allow you to create goals in all permutations of DBG / REL, 32/64 bit, MacOS / Linux. MSVC8 / 9 test for cross-compiler compatibility.

0
source

Source: https://habr.com/ru/post/887941/


All Articles