我已经安装了NetCDF“binary-netcdf-4.0.1_gfortran_gfortran_c++.tar”。但我不确定我使用的 gfortran 编译器。如何找到我使用过的编译器?
运行
gfortran -v
告诉您您拥有哪个版本。
从netcdf 4.1开始,它使用pkg-config,你可以这样做:
$ nc-config --all
这给出了类似的东西:
This netCDF 4.1.1 has been built with the following features: --libs -> -L/opt/local/lib -lnetcdf --fc -> openmpif77 --fflags -> -O2 -m32 -I/opt/local/include --flibs -> -L/opt/local/lib -lnetcdff -lnetcdf --has-f77 -> yes --has-f90 -> yes