jowr / librefprop.so

Create a shared library from the Fortran sources provided by Refprop from NIST. This project provides an alternative to the refprop.dll that comes with the software. Please use the official instructions if possible
https://github.com/usnistgov/REFPROP-cmake
33 stars 8 forks source link

Intel-style exports for REFPROP #7

Closed ibell closed 10 years ago

ibell commented 10 years ago

Hey @jowr, is it possible to export the symbols in the dynamic library in the same way that is used in the windows REFPROP DLL? That would allow us to use the REFPROP dylib on OSX more or less natively with the refpropm MATLAB file available from the REFPROP FAQ.

jowr commented 10 years ago

Hi, according to http://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html, you can get your desired behaviour by using -fno-underscoring as compile flag. However, they do not recommend it for production use...

ibell commented 10 years ago

Hmm it seems the default is to be lower case as well. Is there a combination of flags that will not change the case and not add the underscores? It seems the docs are not terribly comprehensive on this topic.

On Thu, Jan 30, 2014 at 7:26 PM, Jorrit Wronski notifications@github.comwrote:

Hi, according to http://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html, you can get your desired behaviour by using -fno-underscoring as compile flag. However, they do not recommend it for production use...

Reply to this email directly or view it on GitHubhttps://github.com/jowr/librefprop.so/issues/7#issuecomment-33717068 .

jowr commented 10 years ago

@ibell, I added the shell script that I use to change the matlab files in 3a369e55356fb3b3cf37b719da03a9b9df97bce1. I also updated the readme.md, please have and look there. I think we should NOT act against the explicit advice of the gfortran crew and compile the library with some funky flags... I hope this solution works for you.

ibell commented 10 years ago

@jowr, Yes I think the gfortran guys are overly pedantic in this case. I think if we can find a set of flags that give us the behavior that we want, we should be in business. Your fix for the matlab files looks like a good mid-term solution.

On Thu, Jan 30, 2014 at 10:44 PM, Jorrit Wronski notifications@github.comwrote:

@ibell https://github.com/ibell, I added the shell script that I use to change the matlab files in 3a369e5https://github.com/jowr/librefprop.so/commit/3a369e55356fb3b3cf37b719da03a9b9df97bce1. I also updated the readme.md, please have and look there. I think we should act against the explicit advice of the gfortran crew and compile the library with some funky flags... I hope this solution works for you.

Reply to this email directly or view it on GitHubhttps://github.com/jowr/librefprop.so/issues/7#issuecomment-33737227 .