Windows上用Intel编译netCDF-Fortran

1.下载并安装netCDF-C

https://downloads.unidata.ucar.edu/netcdf/

安装目录D:\software\netCDF4.9.2

 2.下载netCDF-Fortran

3.编译netCDF-Fortran

(1)解压源代码netcdf-fortran-4.6.1.zip到D:\software\netcdf-fortran-4.6.1\source

(2)打开 Intel oneAPI command prompt for Intel 64 for Visual Studio

cd D:/software/netcdf-fortran-4.6.1\

(3)用cmake生成项目

新建目录Release

cmake -S source -B build-release  -DCMAKE_BUILD_TYPE:STRING=RELEASE -DnetCDF_LIBRARIES=D:/software/netCDF4.9.2/lib/netcdf.lib -DnetCDF_INCLUDE_DIR=D:/software/netCDF4.9.2/include -DCMAKE_INSTALL_PREFIX=D:/software/netcdf-fortran-4.6.1/Release

(4)编译

cmake --build build-release --target netcdff netcdff_c --config Release
cd build-release\fortran
lib netcdff.dir\Release\*.obj netcdff_c.dir\Release\netcdff_c.lib /out:Release\netcdff.lib
cd ..\..\
cmake --build build-release --target ALL_BUILD --config Release
cmake --build build-release --target INSTALL --config Release

 

posted @   慕尘  阅读(318)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
历史上的今天:
2020-08-20 mongo存储引擎
2019-08-20 mysql字段值如何区分大小写
2019-08-20 Spring Boot 的Logback
2019-08-20 去掉WARN spring.jpa.open-in-view is enabled by default
2019-08-20 spring boot 指定启动端口
2015-08-20 YII2.0 Activeform表单组件的使用方法
2015-08-20 关于Yii2中CSS,JS文件的引入心得
点击右上角即可分享
微信分享提示