[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: f2c obsolete?

From: Michael Goffioul
Subject: Re: f2c obsolete?
Date: Wed, 31 Oct 2007 21:18:22 +0100

On 10/31/07, John W. Eaton <address@hidden> wrote:
> | Not really. An additional -subsystem:console flag needs also to be
> | passed to the linker. This is required to tell the linker that the entry
> | point is main and not WinMain. By default, it looks for WinMain
> | except if main is present in one of the object files. When compiling
> | a fortran program with f2c, the main symbol is part of the libf2c
> | (which calls MAIN__). This defeats the autodetection in the linker,
> | which looks for WinMain and fails.
> |
> | Where should this flag belong?
> I don't know and I'm a bit confused about when it is needed.  Is it
> only necessary to use this option when compiling and linking a Fortran
> (only) program?

This is only needed when linking a fortran program; in the context
of octave, it would only be used by the configure script. However, I
chose to not touch octave configure script and to handle the additional
flags myself like:

 F77=fort77 FFLAGS="-Wc,-MD -Wl,-subsystem:console" \
    FLIBS=-lf2c ./configure

This works fine.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]