Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[photran] how to link a Fortran subroutine to a C subroutine in eclipse, and vice versa?

Dear photran user:
      I want to call a Fortran subroutine from C subroutine in eclipse3.2. I found I can not treat this as easy as in Visual Studio. But I like to use eclipse, so I want to solve this problem.
     Would someone please give me some advice?
 
For example:
//C codes,in "main.c" file
void main{
void CALLFOR();
CALLFOR();
}
*********************************
//fortran codes, in "callfor.f" file
subroutine callfor()
implicit none
write(*,*)"Hell C Program"
end
**********************************
 
If  the two files were put into MS visual studio, they will be compiled and linked to an executable file correctly.
But when they put into eclipse3.2 with "managed make fortran project", they can not link together automaticly. How can I set the eclipse envirement?
 
Please give me some advice,or give me some reference article!
 
Thanks a million!
 
Best regards,
Zhenjie
 
 
 
 
 
 
 
 
 
 
 
 

Back to the top