ubuntu - fortran c++ linking libraries -
i have been trying while run fortran code links library uses c++ routines. code simple:
program simple_program implicit none #include "looptools.h" phone call ltini print *, b0(1000d0, 50d0, 80d0) phone call ltexi end
according developer should work if compile
gfortran -i$lt/include example.f -l$lt/lib -looptools
i added -lstdc++ @ end of line when compiling. lt variable set right directory (where bundle , libraries installed). problem seems ignore c++ functions included in package, think not linking fortran , c++ libraries. happening wiht simple illustration , compiled developer suggests, think maybe has version of ubuntu libraries linking f , c++?
the problem solved adding -ff2c @ end in command line, generate code designed compatible code generated g77 , f2c
c++ ubuntu compiler-errors fortran
No comments:
Post a Comment