octave-maintainers
[Top][All Lists]
Advanced

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

Re: f2c obsolete?


From: John W. Eaton
Subject: Re: f2c obsolete?
Date: Wed, 31 Oct 2007 15:14:13 -0400

On 25-Oct-2007, Michael Goffioul wrote:

| 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?

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?

jwe



reply via email to

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