Mail Archives: cygwin/1999/01/19/11:48:39
On 18 Jan 99, at 13:34, Suhaib M. Siddiqi wrote:
> Has anyone any suggestions why G77 (EGCS-1.1.1) gives undefined
> refernece to fork_. I get same problem on RedHat Linux 5.2 with
> EGCS-1.1.1 and Cygnus-B20 with EGCS-1.1.1.
>
> gridu.f: undefined reference to `fork_'
> collect2: ld returned 1 exit status.
>
This a common feature of interfacing C and fortran call
fortrand by default append a decorating _ (as mangling) for the linker stage.
while C do not.
There is two solution either your fortran compiler has an option to generates
C style function name. it is not supported by all compiler and I am not sure
for g77
either you create a warping function in C wich is fork_ and call fork
By the way to don't get confuse afterward you d rather call your function with
a prefix so it do not look too simalar to the C function in fortran and C code
like fc_fork_ or whatever.
//////////////////////////////////////////////////
//
// Stephane Cateland <cateland AT adersa DOT asso DOT fr>
//
// Adersa 10 rue de la croix Martre
// 91873 Palaiseau cedex FRANCE
//
// Phone [switchboard] (33) 0 160 135 353
// Fax (33) 0 169 200 563
//
//////////////////////////////////////////////////
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -