FW: how do I link a C function with a gfortran program

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The convention is that all fortran subroutines have an underscore at the
end.

In your C file, declare it as long read_block_, and in your fortran code
call it 'read_block'.

->Both program and function compile, but when I try to link, I get the
->message,  "undefined reference to 'read_block_'."


The linker is asking for a symbol called read_block_. Not read_block.


HTH,
bud


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux