tar -zxvf netcdf-fortran-4.4.5.tar.gz
cd netcdf-fortran-4.4.5
export CPPFLAGS="-I/path/to/SMOKE/HDF5/include -I/path/to/SMOKE/NETCDF/include” export LDFLAGS="-L/path/to/SMOKE/HDF5/lib -Wl,-rpath=/path/to/SMOKE/HDF5/lib -L/path/to/SMOKE/NETCDF/lib -Wl,-rpath=/path/to/SMOKE/NETCDF/lib" export CFLAGS="-L/path/to/SMOKE/HDF5/lib -I/path/to/SMOKE/HDF5/include -L/path/to/SMOKE/NETCDF/lib -I/path/to/NETCDF/include" export CXXFLAGS="-L/path/to/SMOKE/HDF5/lib -I/path/to/SMOKE/HDF5/include -L/path/to/SMOKE/NETCDF/lib -I/path/to/NETCDF/include" export FCFLAGS="-L/path/to/SMOKE/HDF5/lib -I/path/to/SMOKE/HDF5/include -L/path/to/SMOKE/NETCDF/lib -I/path/to/NETCDF/include"
./configure --prefix=/path/to/NETCDF --enable-shared --with-pic --disable-doxygen --enable-largefile --enable-static CC=mpicc CXX=mpicxx FC=mpifort F77=mpifort F90=mpifort CFLAGS="-O3 -fPIC -Wno-incompatible-pointer-types-discards-qualifiers -Wno-non-literal-null-conversion" CXXFLAGS="-O3 -fPIC -Wno-incompatible-pointer-types-discards-qualifiers" FCFLAGS="-O3 -fPIC" FFLAGS="-O3 -fPIC"
vi libtool
wl='-Wl,'
执行6.a之后,按“Esc”键,输入“:set nu”,按“Enter”即可显示出行号。
make make install