24小时热门版块排行榜    

查看: 3084  |  回复: 9

orential

木虫 (小有名气)

[求助] 如何用C++6.0调用refprop物性查询软件

如何用C++6.0调用refprop物性查询软件,在网上搜了很多,只有matlab以及fortran调用refprop的,想知道为什么,求高手指教,最好能详细点
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

落花虽有意,锄头本无情
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
2楼2012-09-11 23:43:08
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

li343

至尊木虫 (职业作家)

【答案】应助回帖


感谢参与,应助指数 +1
天也潇潇: 金币+1, 鼓励应助,建议您重新编辑一下帖子,乱码问题我会及时反馈给管理者 2012-09-12 20:50:35
看帮助,这个很容易的。跟MATLAB啥的调用基本上都是一样的。
Sample C++ Code
The example C code, called EX_C1.CPP (located in the CPP.Zip file), uses explicit (sometimes called late) linking for the functions in the dll.  All functions exported by the dll have been provided in the header file, REFPROP1.h, for completeness.  All functions exported by REFPROP are in the file PASS_FTN.FOR located the REFPROP\FORTRAN directory.  This sample code was tested with the Microsoft Visual C++ compiler in Visual Studio 2003 (Microsoft 32-bit C/C++ Compiler Version 13.10.3077).  The main issues in mixed-language code compiling are function naming conventions, argument passing, and stack maintenance.  Explicit calling of the FORTRAN functions in the dll allows one to define a function pointer name explicitly.  The _stdcall keyword on the function prototype lets the compiler know how arguments will be passed and which side is responsible for cleaning the stack after the function call.

关键有两点:  
1) 确认REFPROP的??置
The REFPROP fluids directory should be located in "C:\Program Files\REFPROP\fluids".
2) 注??借???程?????REFPROP的版本和你的C++是???对应,??是任?????一个就能用的。
3楼2012-09-12 16:38:54
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

li343

至尊木虫 (职业作家)

咋出现乱码了晕!
4楼2012-09-12 16:40:17
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

orential

木虫 (小有名气)

引用回帖:
4楼: Originally posted by li343 at 2012-09-12 16:40:17
咋出现乱码了晕!

里面有很多代码不懂,路径这些我也知道,能不能详细点
落花虽有意,锄头本无情
5楼2012-09-12 17:05:55
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

orential

木虫 (小有名气)

引用回帖:
4楼: Originally posted by li343 at 2012-09-12 16:40:17
咋出现乱码了晕!

最好能举个例子怎么调用
落花虽有意,锄头本无情
6楼2012-09-12 17:08:09
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

li343

至尊木虫 (职业作家)

【答案】应助回帖

REFPROP自身带有例子的呀,连这都不知道?
一般位置都在C:\Program Files\REFPROP\examples
有两点注意:
1)REFPROP的安装路径;
2)程序的版本,很重要。
7楼2012-09-13 08:29:23
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

orential

木虫 (小有名气)

引用回帖:
7楼: Originally posted by li343 at 2012-09-13 08:29:23
REFPROP自身带有例子的呀,连这都不知道?
一般位置都在C:\Program Files\REFPROP\examples
有两点注意:
1)REFPROP的安装路径;
2)程序的版本,很重要。

说的很模糊啊
落花虽有意,锄头本无情
8楼2012-09-13 11:32:19
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

pym422583407

新虫 (初入文坛)

如何运用refprop求:二元非共沸混合物在某一质量浓度下的泡点压力和露点压力?
9楼2012-11-07 13:30:21
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zzezc

新虫 (初入文坛)

引用回帖:
8楼: Originally posted by orential at 2012-09-13 11:32:19
说的很模糊啊...

楼主您现在会了嘛,我也急求C++调用的例子!!!
10楼2018-10-12 11:45:29
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 orential 的主题更新
信息提示
请填处理意见