usnistgov / REFPROP-wrappers

Wrappers around NIST REFPROP for languages such as Python, MATLAB, etc.
193 stars 127 forks source link

Error 101 - while loading nitrogen.fld during calling of IntSetup #620

Open tpsudhakar opened 2 months ago

tpsudhakar commented 2 months ago

Hi,

I am pretty new to reprop.dll. And we have recently ported our C++ code to MSVC and compile refprop using Intel Fortran compiler and from then onwards I am getting an error while call IntSetup(). I have populated all the required fields int CINPUT.cstrin but still for some reason it reading something wrongly and not able to find the file.

Below are my decalaration

extern __declspec(dllimport) struct { char cstrin[255] = {'\0'}; char cstr[255] = { '\0' }; }CINPUT;

void INTSETUP(int iNoComp, int iRefCode);

And I have populated the cstrin like below to make sure the string is null terminated but I am still running into this file not found error. Any help is much appreciated.

strcpy(CINPUT.cstrin, sString.data()); CINPUT.cstrin[sString.length() + 1] = { '\0' };

Error:

image

ianhbell commented 2 months ago

That is not a function that is part of REFPROP. Please put together an example that does not use any of your functions.