简体   繁体   English

在Windows的CentOS上交叉编译C ++ 11/14

[英]Cross-compile C++11/14 on CentOS for Windows

I've set up a CentOS 6.5 box running jenkins, among other things, which I want to use for building a project I'm working on with a couple of friends. 我已经设置了一个运行jenkins的CentOS 6.5盒子,我想将其用于构建与几个朋友一起工作的项目。 It's designed to run on Windows, as we all have windows. 它设计为可在Windows上运行,因为我们都有Windows。

The problem I'm having is that I haven't found a cross-compiler that works on CentOS. 我遇到的问题是我还没有找到可以在CentOS上运行的交叉编译器。 Everything I've seen only works on Debian-based distros, and the few that I've found that have been presented as "working on red hat" don't actually work, or their methods of acquisition don't seem viable anymore. 我所见过的一切都只能在基于Debian的发行版上运行,而我发现的少数几个被展示为“在Red Hat上工作”实际上不起作用,或者它们的获取方法似乎不再可行。

It would be preferable that it supports C++11, or even C++14, as a couple of the guys I'm working on it with haven't ever delved into anything before C++11 and they're "scared of relearning half of what they know." 最好是它支持C ++ 11甚至C ++ 14,因为我与之合作的几个人在C ++ 11之前从未研究过任何东西,他们“害怕”重新学习他们所知道的一半。”

Everything I've searched for about MinGW or cross-compiling on CentOS has led to a dead end. 我搜索过的有关MinGW或在CentOS上进行交叉编译的所有内容均已陷入僵局。 Am I better off scrapping the installation and installing something debian-based like ubuntu server, or is there a cross-compiler that actually works to compile for windows on redhat distros? 我最好放弃安装并安装基于debian的东西,例如ubuntu服务器,还是有一个交叉编译器实际上可以在redhat发行版上为Windows编译?

You can use g++ C++ 11. For this you need to install it on your centOS machine. 您可以使用g ++ C ++11。为此,您需要将其安装在centOS计算机上。 The installation procedure can be found on the following link - Install g++ C++ 11 . 可在以下链接上找到安装过程- 安装g ++ C ++ 11 I have been using this and it works fine. 我一直在使用它,并且效果很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM