C++libc配置
- 方法一
直接在相应的ubuntu版本下写题
- 方法二 在相应的ubuntu中创建C++文件,并且g++ -g test.cpp -o test,然后直接去指向的文件找copy其中的libc文件
- cp /lib/x86_64-linux-gnu/libstdc++.so.6 ~/libstdc++.so.6
- docker cp 9356a578cce7:/root/libstdc++.so.6 C:\Users\ZP\Desktop
- Successfully copied 2.52MB to C:\Users\ZP\Desktop
//C++
#include<iostream>
using namespace std;
int main(){
cout<<"Hello world"<<endl;
return 0;
}
- 方法三
- docker run -it ubuntu:20.04 /bin/bash
- apt update
- apt install build-essential
- 安装vim然后像方法二一样做即可