如何在Visual Studio 2010 for Linux中编译 [英] How to compile in Visual Studio 2010 for Linux

查看:162
本文介绍了如何在Visual Studio 2010 for Linux中编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Windows上使用Visual Studio 2010(不一定是MSVC编译器)开发C / C ++,并获取一个二进制文件,我可以将其上传到Linux机器(并运行它)?



可能性我检查是使用MinGW或类似的东西获取Windows二进制文件做同样的事情,linux二进制文件会做,但我有问题,以获得所有需要的库(posix)的所有win端口。 / p>

编辑:我不想让windows二进制在linux上运行。我需要一个原生的linux二进制文件作为结果。

解决方案

感谢大家!我的解决方案总结:


  1. 与平台无关的代码是使用Visual Studio开发的

  2. 对于Linux)是使用运行Debian或RHEL的虚拟盒执行的

  3. Virtual Box中的IDE是带有CDT插件的Eclipse

  4. 使用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:

  1. Platform-independent code is developed using Visual Studio
  2. Final Build (for Linux) is performed using a Virtual Box running Debian or RHEL
  3. IDE within the Virtual Box is Eclipse with the CDT plugin
  4. Use CMake To generate the project files for both Visual Studio and Eclipse CMake

这篇关于如何在Visual Studio 2010 for Linux中编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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