Click to See Complete Forum and Search --> : Linking FORTRAN and C; intrinsic functions


D Polen
June 18th, 1999, 09:21 AM
I'm trying to call a FORTRAN subroutine from my C code. I get link errors because the FORTRAN sub has calls to intrinsic functions in it (LOG, SQRT, etc.). When I comment these lines out of the sub everything works fine. Suggestions?

D Polen
June 21st, 1999, 10:13 AM
Anyone do any mixed language programming?

ALM
June 21st, 1999, 11:25 AM
I did, ages ago.

It sounds like you're not linking with a required FORTRAN library. If you're linking with the C linker, it doesn't have a clue about FORTRAN libraries so you need to specify them explicitly.

Good luck -- I know it's not fun.
Alvaro