Re: quick question about linking Fortran and C



On 17 aug, 16:07, Gordon Sande <g.sa...@xxxxxxxxxxxxxxxx> wrote:
On 2007-08-17 10:48:29 -0300, otto.piv...@xxxxxxxxx said:





Hello,

The gist of my problem is that when I compile testc.c

int
MAIN__( int argc, char* argv[] )
{printf("argc is %i", argc);
return(0);}

with icc -c testc.c

and link with
ifort -o test testc.o
I get garbage for argc and a bad address for argv. This works fine
with gfortran, but g77 and ifort both give problems.

Any advice is appreciated; many thanks in advance.

Vendors Fortran manuals typically have a section near the end on mixed
language programming. One of the sections usually discusses the foilbles
of linking the various language dependent libraries. All recommended for
your situation and all quite arcane. Each vendor will have a unique
problems and solutions.

Unfortunately the "Here be dragons" in large boldface is often missing. ;-)- Tekst uit oorspronkelijk bericht niet weergeven -

- Tekst uit oorspronkelijk bericht weergeven -

No problem, as long as you remember to bring along St. George ...

Regards,

Arjen

.



Relevant Pages