Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: francois CARTIER <cartier@lcus15.saclay.cea.fr>
Subject: passing between C and Fortran
Date: 1995/11/14	[thread overview]
Message-ID: <48aa3t$9im@news.cea.fr> (raw)

Hi,

I have a C program calling Fortran functions, and inside the Fortran,
i need to call some C functions.
My programs comes from HPUX and i have to compile it on OSF1.
But the f77 compiler isn't very happy with my source file..
any help ?

>>> file main.c <<<
main()
{
   essaifort();
}

>>> file fortran.F <<<
$ALIAS recupfort='recupfort'(%val)

      integer function essaifort()
      integer ii=123

      call recupfort(ii)
      return
      end

>>> file c2.c <<<
#include <stdio.h>
void recupfort(ic)
int *ic;
{
    printf(" ic arg = %d\n",ic);
}

And the compiler response is...
$ALIAS recupfort='recupfort'(%val)
^
fort: Severe: argFort.F, line 1: Missing operator or delimiter symbol

I wonder that my $ALIAS is not known by OSF1, but what else ?
Any help will be appreciated

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Francois CARTIER              |   /| |~) /~\ |~)  /| ~|~ /~\ | |~) |_~
cartier@lcus15.saclay.cea.fr  |__/~| |_) \_/ |~\ /~|  |  \_/ | |~\ |__

CEA - CEREM     |~\ |_~   /~` /~\ |\| ~|~ |~) /~\ |   |_~   |~) /| |~)
Service des     |_/ |__   \_, \_/ | |  |  |~\ \_/ |__ |__   |  /~| |~\
Techniques Avancees
LCUS                                  | | |  ~|~ |~)  /| (~ /~\ |\| (~
91191 Gif sur Yvette FRANCE           |_| |__ |  |~\ /~| _) \_/ | | _)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





             reply	other threads:[~1995-11-14  5:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-11-14  5:00 francois CARTIER [this message]
1995-11-15  5:00 ` passing between C and Fortran Juergen Fuhrmann
1995-11-16  5:00 ` Shlenov Svyatoslav
1995-11-16  5:00 ` Steve Lionel
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox