I am writing a program with a mandate to use nothing but Fortran. However, I need to call the C library routines mmap, msync, and munmap.
The code is all in place and compiles fine but when I compile I get unresolved synbol errors for mmap_, msync_, and munmap_. Aparently, the compiler is trying to tack on underscore onto the function names. If I compile with -nus I get unresolved symbols for all the external fortran routines I am calling but none for the C library functions.
Is there a way to tell the compiler to not tack on the underscore for certain functions?
Just in case you are interested, I did define an interface for mmap. Here is how it looks:
FUNCTION MMAP(start, length, prot, flags, fd, offset) RESULT(Address)
END FUNCTION MMAP
I did not define an interface for msync or munmap. I am compiling with only the -g option.