如何在Visual Studio 2010 for Linux中编译 [英] How to compile in Visual Studio 2010 for Linux
问题描述
是否可以在Windows上使用Visual Studio 2010(不一定是MSVC编译器)开发C / C ++,并获取一个二进制文件,我可以将其上传到Linux机器(并运行它)?
可能性我检查是使用MinGW或类似的东西获取Windows二进制文件做同样的事情,linux二进制文件会做,但我有问题,以获得所有需要的库(posix)的所有win端口。 / p>
编辑:我不想让windows二进制在linux上运行。我需要一个原生的linux二进制文件作为结果。
感谢大家!我的解决方案总结:
- 与平台无关的代码是使用Visual Studio开发的
- 对于Linux)是使用运行Debian或RHEL的虚拟盒执行的
- Virtual Box中的IDE是带有CDT插件的Eclipse
- 使用CMake Visual Studio和Eclipse CMake的项目文件
Is it possible to develop C/C++ on Windows using Visual Studio 2010 (not necessarily the MSVC Compiler) and get a binary that I can upload to a linux machine (and run it)?
On possibility I checked was to use MinGW or something similar to get windows binaries doing the same thing that linux binaries would do but I had problems to get all win-ports for all needed libraries (posix).
EDIT: I do not want to let the windows binary run on linux. I need a native linux binary as a result.
Thanks to all of you! My solution is summarized:
- Platform-independent code is developed using Visual Studio
- Final Build (for Linux) is performed using a Virtual Box running Debian or RHEL
- IDE within the Virtual Box is Eclipse with the CDT plugin
- Use CMake To generate the project files for both Visual Studio and Eclipse CMake
这篇关于如何在Visual Studio 2010 for Linux中编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!