Windows10 VS2017 C++编译Linux程序
版权声明:本文可能为博主原创文章,若标明出处可随便转载。 https://blog.csdn.net/Jailman/article/details/85326660 #include <cstdio> #include <iostream> #include "unistd.h" using namespace std; int main() { while (true) { cout << "hello linux!" << endl; sleep(1); } return 0; } 开启Linux虚拟机,运行以上代码,弹出连接框,输入地址,用户名和密码,Linux需要安装g++和GDB。 有一些库和函数include之后vs会报错,但是编译可以正常进行。 vs2017持续打开一定时间后,会提示rsync.exe和devenv.exe需要联网,这时允许之后,再看编辑提示,报错消失……