Hey all,
I apologise if this is a simple question, however I haven't been able to find the solution around, and since I am not a C++ programmer by trade let's say.
I'm trying to utilise the CoolProp shared library within the C++ on Windows environment, however I'm running into issues with "undefined reference to ..." with whatever function I'm trying to call. I guess because it doesn't find the functions in the library?
Some context: Particular to my case, I'm using Matlab Coder to generate the C++ code (later will be combined with Simulink models, extensive Matlab libraries, etc, so not looking to change language unfortunately). When generating to
C code and including CoolPropLib.h, and linking to CoolProp.lib with CoolProp.dll (available
https://sourceforge.net/projects/coolprop/files/CoolProp/6.4.1/shared_library/Windows/64bit/), this can be compiled correctly. However, when I try to generate to
C++ code I run into the previously mentioned compilation errors, even in simple examples not involving Matlab Coder.
So to try and be specific, my main question is: what are the specific files (headers, libraries, linking (?) libraries) that should be included when utilising a CoolProp shared library in C++ on Windows?
- Is it CoolProp.h, CoolPropLib.h, or?
- Is it CoolProp.dll, libCoolProp.dll, or?
- Is it the same .lib, .dll.a, or?
- And how is a basic example compiled?
Is there a precompiled version around that should work for my use case? Or, I've successfully compiled the shared library myself using CMake and MinGW (g++ from mingw-w64/x86_64-8.1.0), but I just can't get it to be called correctly.
I appreciate any help you can give me!
Thanks a lot,
Kind regards,
Nathan