CentOS Stream 9—— C/C++ gcc(c/c++编译器安装)

echo-efun / 2024-04-22 / 原文

sudo su
yum groupinstall 'Development Tools'
yum install ccache
vim helloworld.cpp
#include <iostream>
using namespace std;
int main()
{
    std::cout << "Hello world" << std::endl;
    return 0;
}
ccache g++ helloworld.cpp -o helloworld
./helloworld