Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski 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
May 1, 2010
1
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.
 
Replies continue below

Recommended for you

Status
Not open for further replies.

Part and Inventory Search

Sponsor