Hello, What's the best practice for linking Fortran program with C++ library? The library is external, built using autotools, either dynamic or static.
The problem is that runtime c++ library is not linked when the library is static. I though that the recommended way to deal with it is: set_property(TARGET ${prog} PROPERTY LINKER_LANGUAGE CXX) It works fine with GCC but I've just found out it doesn't work with Intel compiler on Linux: undefined reference to `main' I'm not sure how about other compilers. Is there a better way? Marcin -- 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://www.cmake.org/mailman/listinfo/cmake