网页
综合
更新时间 2026-11-14 12:26:02
Coolprop的编译方法-菜鸟编程-鸟儿博客
自动蜘蛛
www.birdol.com
正文约 1534 字
http://www.coolprop.org/coolprop/wrappers/Csharp/index.html#user-compiled-binaries
来源:http://www.coolprop.org/coolprop/wrappers/index.html#wrapper-common-prereqs
git (to interface with the CoolProp repository at https://github.com/CoolProp/CoolProp)
python (to generate the header files and convert them to binary file)
CMake (platform-independent software to generate makefiles)
都需要加入到环境变量中,即:在命令行直接执行时,可以调用的到。比如:
On Windows, download the newest binary installer for CMake from CMake downloads. Run the installer. Check that at the command prompt you can do something like:
C:\Users\XXXX>cmake -versioncmake version 2.8.12.2
For git, your best best is the installer from http://msysgit.github.io/. Check that at the command prompt you can do something like:
C:\Users\XXXX>git --versiongit version 1.9.4.msysgit.0
For 7-zip, download the installer from http://www.7-zip.org/ . Check that at the command prompt you can do something like:
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...] [<@listfiles...>]
命令 git clone https://github.com/CoolProp/CoolProp --recursive
这个命令因为科学网的原因,可能会下载不完整,推荐使用github desktop进行下载。
修改:coolprop\dev\generate_headers.py
gitrev_to_file 函数改为以下内容。
修改:coolprop\src\CoolProp.cpp
65行找不到引用,注释掉 gitrevision.h的引用
963行提示未定义标识符gitrevision,改为version
编译完成后,会在build文件夹里生成 platform-independent.7z,这个压缩包里的内容是C#调用Coolprop需要的中间件。
注意上述的指令中,使用了namespace,设置为MyProp,对应生成的中间件也会跟着变化,需要配套使用。
了解 认证开发者 详情,或加QQ:8769298了解详情。
转载请注明:鸟儿博客 » Coolprop的编译方法
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。