开发者

Multiplatform C++ cross-compiler

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 build the library for (at least) {Windows 7, Mac OS X, Ubuntu 11.04} × {32 bit, 64 bit} × {Debug, Release}. I don't care if the whole build from scratch takes forever or if the gcc bina开发者_如何学Pythonry is 1 GB. If the cross-compiler cannot be a single executable, what is the workflow I should use to compile (and recompile) my library?

The host machine would be a Ubuntu 11.04.


Building cross-compiler is quite well covered in OSDev Wiki. For Windows, you can use mingw packages in your distro's repository


Windows host + TeamCity + GCC (mingw) + Gnu Make (or complementary build script solution) + MSVC8/9

You can have teamcity automate the building of everything for you, GCC will let you build targets in all DBG/REL, 32/64 bit, MacOS/Linux permutations. MSVC8/9 test for cross-compiler compatibilities.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜