On 11/01/2016 17:58, Michael Jackson wrote:
subroutine SingleEBSDPattern(ipar, fpar, EBSDpattern, quats, accum_e, mLPNH, mLPSH) bind(c, name='SingleEBSDPattern')

Surely if you use bind(C) you need do no more than extern "C" the declaration when compiling C++. I thought bind(C) meant mangle the external name in the same way that a C module would.

We use the FortranCInterface module for old Fortran procedures that are not using ISO_C_BINDING and bind(C), for them we add the symbols to the FortranCInterface_HEADER() command and use the generated macros to reference the symbols in C/C++.

We also execute FortranCInterface_VERIFY(CXX QUIET) before the FortranCInterface_HEADERS() command.

It all works OK but we only use gcc/g++/Clang/Clang++/gfortran compilers.

Regards
Bill Somerville.
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to