← Back to team overview

yade-users team mailing list archive

[Question #654032]: Linking a fortran module with Yade (CMakeLists.txt)

 

New question #654032 on Yade:
https://answers.launchpad.net/yade/+question/654032

Hello, 

I am trying to link a fortran module which is called by a C++ code inside Yade and I am not sure how to compile it properly with CMake (looks like CMake doesn't compile the fortran source)

I modified the trunk/CMakeLists.txt as :  

project(Yade C CXX Fortran)
set(CMAKE_Fortran_COMPILER "mpif90")  
set(CMAKE_CXX_COMPILER "mpicxx")
set(CMAKE_C_COMPILER "mpicc")
....
FIND_PACKAGE(MPI)

I put the fortran source in the trunk/py folder along with the C++ functions (implemented in _utils.hpp and_utils.cpp) and compilation proceeds without any errors.  However when I start yade I get an undefined symbol error which looks this :

 undefined symbol: __coupler_MOD_hello   (coupler fortran module name, and hello name of function in fortran)

This is because the fortran module has not been linked during compilation.  My question is how can I link fortran sources for compilation. 

Thanks and Regards, 
Deepak






-- 
You received this question notification because your team yade-users is
an answer contact for Yade.