octave-maintainers
[Top][All Lists]
Advanced

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

Re: f2c obsolete?


From: Michael Goffioul
Subject: Re: f2c obsolete?
Date: Thu, 25 Oct 2007 07:12:03 +0200

On 10/24/07, John W. Eaton <address@hidden> wrote:
> So is -MD supposed to be passed to the C compiler or the linker?
> Either way, it looks like you should be able to use -Wc,-MD or -Wl,-MD
> to send the options through fort77 without having to modify the fort77
> script itself.

-MD is a compiler flag.

> If that works, then the only modification that I see that should be
> necessary is the one I posted earlier to make -v print actual verbose
> output from the compilers so that fort77 will play nice with the
> AC_F77_LIBRARY_LDFLAGS autoconf macro.

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?

Michael.


reply via email to

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