Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fortran Program Calls C subroutine

Status
Not open for further replies.

saracooper

Computer
Joined
May 1, 2010
Messages
1
Location
IT
Hello, I am a C programmer, I have developed a set of subroutines in C and put them in a library, a .a file. These subroutines get called inside a Fortran program using CALL subroutine name.
I am working on IBM AIX. So the command I use to compile & link is -

xlf -o add.o -c liborac.a add.f
where liborac.a is the library with C subroutines

This gives me link errors saying my subroutines not found

The question is do I have some option missing to link these routines to the Fortran program. Or do I have to include the prototypes of the subroutines in the add.f program, like in C. Any help is appreciated. Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top