C call, in a Fortran subroutine, within a C main program
From: Mathieu Fregeau (mathieu.fregeau_at_polymtl.ca)
Date: 10/30/03
- Next message: Michael Metcalf: "Re: weird problem Fortran 77"
- Previous message: Mark Crispin: "Re: Something strange with g77 ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Oct 2003 16:46:11 GMT
Hi guys,
I have a main program, in C (which contains the "main" ). I have some
subroutine in Fortran. There is no problems there since I know how to call
back Fortran in a C program, using the following:
in .c where I want my fortran sub to be called:
extern void __stdcall ice(long*);
...
int main(void)
{
...
int anInteger = 0;
ice(&anInteger);
... return(0);
}
in the fortran:
SUBROUTINE ice(theInt);
INTEGER theInt
...
END
ok, but the question is, how to call a C function, within a fortran
subroutine, previously called by the main "C" routine? That is of great
importance since many infos are within the C code and I want some routine in
Fortran to reach those infos at run time.
thanks a lot
Mathieu
- Next message: Michael Metcalf: "Re: weird problem Fortran 77"
- Previous message: Mark Crispin: "Re: Something strange with g77 ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|