C# wrapper #2355
pratikdeokar-R1
started this conversation in
General
C# wrapper
#2355
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am seeking help to create a wrapper for CoolProp and use it in a C# windows application code. I use Visual Studio 15 2017.
I used the steps mentioned in http://www.coolprop.org/coolprop/wrappers/Csharp/index.html#user-compiled-binaries.
Until the steps for;
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
csc Example.cs platform-independent/*.cs -platform:x64
Example
And I get below message. I am new to using cmake and SWIG, and cannot figure out what went wrong.
Unhandled Exception: System.TypeInitializationException: The type initializer for 'CoolPropPINVOKE' threw an exception. ---> System.TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'CoolProp': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at CoolPropPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_CoolProp(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate)
at CoolPropPINVOKE.SWIGExceptionHelper..cctor()
--- End of inner exception stack trace ---
at CoolPropPINVOKE.SWIGExceptionHelper..ctor()
at CoolPropPINVOKE..cctor()
--- End of inner exception stack trace ---
at CoolPropPINVOKE.get_global_param_string(String jarg1)
at CoolProp.get_global_param_string(String ParamName)
at ConsoleApplication1.Program.Main(String[] args)
Any help would be appreciated!
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions