calllib error when using refpropm in Matlab 2021a

조회 수: 21 (최근 30일)
Federico
Federico 2022년 7월 27일
댓글: Chiara 2025년 7월 21일
Like title says, I get the following error
Error using calllib
Parameter can not be converted to a character vector
Error in refpropm (line 262)
[nc path hmix href ierr errTxt] =
calllib(libName,'SETUPdll',numComponents,path,hmix,href,0,32*ones(255,1),10000,255,3,255);
when I prompt a command like
refpropm('T','P',101.325,'Q',0,'WATER')
I am using MINI-REFPROP which I downloaded from https://trc.nist.gov/refprop/MINIREF/MINIREF.HTM
I followed the guides found at these sources:
I downloaded the various files (both .m and .dll) as well as REFPROP.h
I edited the refprop.m file to point to my MINI-REFPROP install path (which is the default C:\Program Files\MINI-REFPROP\)
I also installed the compiler 'MinGW64 Compiler (C)' and tested it like indicated in the help page, and I edited the rp_proto64.m file, since I previously got the error "Too many input arguments." so I added the (a) to the code
function [methodinfo,structs,enuminfo,ThunkLibName]=rp_proto64(a)
Can anyone help to fix me this error?
  댓글 수: 4
Walter Roberson
Walter Roberson 2022년 7월 28일
Sorry, I do not know.
refprop has been problematic for several years. I have tried to assist other people in the past, but there were problems about supported MATLAB release and supported operating system, and supported compilers.
Federico
Federico 2022년 7월 28일
No problem,
I will try to find something more and try to fix this.
I think we can close the question.
Thanks!

댓글을 달려면 로그인하십시오.

채택된 답변

Federico
Federico 2022년 7월 28일
Just for posterity,
I fixed in this way:
Installing REFPROP10,
following this tutorial
but using this code for refpropm
which has to be copy pasted into the refpropm that you dowload from the above tutorial.
Others passages indicated in the github tutorial are to be followed, but please note that all the files that you need to download have to be placed into the REFPROP folder, and then you need to add that folder to MATLAB using "Set Path" button under "ENVIRONMENT" section.
Hopefully this will help someone too!
  댓글 수: 2
Luuk ten Damme
Luuk ten Damme 2022년 12월 21일
Hi Frederico,
I tried to install the package and run the example of the tutorial. However, I get a bunch of errors, as indicated in the attached image. I have two possible causes:
1. I obtained the REFPRP64.dll file from https://drive.google.com/drive/folders/1gST9ScDUH1rX-zMbs2bwhtNGXuaKnbnR. However, this might not match with the REFPROP installed.
2. I obtained the MINIREF.EXE from https://trc.nist.gov/refprop/MINIREF/MINIREF.HTM and saved the directory as C:\Program Files (x86)\REFPROP.
Do you know how to solve the bunch of errors attached to this message or know a solution for possible issues 1 and/or 2?
Thanks in advance!
Chiara
Chiara 2025년 7월 21일
Have you solved this??

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by