版權聲明:本文可能爲博主原創文章,若標明出處可隨便轉載。 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需要聯網,這時允許之後,再看編輯提示,報錯消失……