鐪嬪府鍔╋紝杩欎釜寰堝鏄撶殑銆傝窡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) 娉ㄦ�?鍊熷?g▼搴?�?奟EFPROP鐨勭増鏈拰浣犵殑C++鏄?﹀搴旓紝涓?鏄换鎰?�?炰竴涓氨鑳界敤鐨勩�偅�