多平台 C++ 交叉编译器 [英] Multiplatform C++ cross-compiler

查看:44
本文介绍了多平台 C++ 交叉编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为 C++ 库构建交叉编译器以在单个构建服务器上面向多个平台?

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

交叉编译器应该能够为(至少){Windows 7, Mac OS X, Ubuntu 11.04} × {32 bit, 64 bit} × {Debug, Release} 构建库.我不在乎从头开始的整个构建是否需要永远,或者 gcc 二进制文件是否为 1 GB.如果交叉编译器不能是单个可执行文件,我应该使用什么工作流程来编译(和重新编译)我的库?

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 binary 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?

主机将是 Ubuntu 11.04.

The host machine would be a Ubuntu 11.04.

推荐答案

构建交叉编译器在 OSDev 维基.对于 Windows,您可以使用发行版存储库中的 mingw 包

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

这篇关于多平台 C++ 交叉编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆