我如何知道我使用的是哪个编译器

问题描述 投票:0回答:2

我已经安装了NetCDF“binary-netcdf-4.0.1_gfortran_gfortran_c++.tar”。但我不确定我使用的 gfortran 编译器。如何找到我使用过的编译器?

gfortran netcdf
2个回答
2
投票

运行

gfortran -v
告诉您您拥有哪个版本。


2
投票

从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
© www.soinside.com 2019 - 2024. All rights reserved.