netCDF > gfortran > ( netcdf.incをインクルード時の指定 > gfortran tmp.f90 -I/usr/include -lnetcdf -lnetcdff ) / ( -lnetcdfと-lnetcdffの違い )
動作環境
CentOS6.8 64bit
以下のディレクトリにnetcdf.incがあるとする。
/usr/include/netcdf.inc
Fortran90のソフトにて以下の宣言(と関連処理)があるとする。
include 'netcdf.inc'
以上の状況でFortan90プログラムをコンパイルするには
gfortran tmp.f90 -I/usr/include -lnetcdf -lnetcdff
-lnetcdf
と-lnetcdff
の違いは以下にあった。
http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg11396.html
The extra 'f' in the -netcdff refers to the fortran library, whereas -lnetcdf is the c library.
Author And Source
この問題について(netCDF > gfortran > ( netcdf.incをインクルード時の指定 > gfortran tmp.f90 -I/usr/include -lnetcdf -lnetcdff ) / ( -lnetcdfと-lnetcdffの違い )), 我々は、より多くの情報をここで見つけました https://qiita.com/7of9/items/b49c16cb01223e937ea4著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .