使用GCC for openEuler
编译运行C程序
(这里以hello.c为例)
hello.c代码
#include <stdio.h> int main() { printf("Hello, World!\n"); return 0; }
gcc hello.c -o hello.out ./hello.out
编译运行Fortran程序
(这里以hello.f90为例)
hello.f90代码
Program main Implicit none write(*,*) "Hello World!" End program main
gfortran hello.f90 -o hello.out ./hello.out

GCC for openEuler基于开源GCC,其命令gcc、g++、gfortran等的使用方式与GCC相同。