1.首先下载vs2015 with update3
2.然后下载Visual C++ for Linux Development
3.在centos 7上yum install openssh-server gdb gcc-g++
然后rpm –i gdb-gdbserver-7.2-90.el6.x86_64.rpm
安装
5.在vs2015中
新建->项目->empty project(linux)

然后新建一个cpp文件(注意文件名为英文)
6.工具->选项->cross platform->connection manager

点add

填写centos的ip,用户名,密码
7.在项目名上右键,调出属性窗口,在target machine上选择你的目标主机

8.填写调试参数

9.写个代码来试试:
#include
using namespace std;
int ab()
{
for (int i &#61; 0;i <10;i&#43;&#43;)
{
cout <
}
}
int main()
{
int a &#61; 1;
cout <<"hello" <ab();
return 0;
}


在centos 中也有生成&#xff0c;这样就成功了