From: Hifi-Comp on
On Jun 20, 3:21 am, baf <b...(a)nowhere.net> wrote:
> Hifi-Comp wrote:
> > On Jun 19, 1:31 pm, baf <b...(a)nowhere.net> wrote:
> >> Tobias Burnus wrote:
> >>> Hifi-Comp wrote:
> >>>> I am using gfortran on windows. -flto is not available for win32 gcc
> >>>> version 4.6.0 20100524.
> >>> Actually, that surprises me - I am pretty sure that LTO support for
> >>> MacOS and Windows went in. Let me search ...
> >>> ... and I remembered correctly. It was enabled for Windows on 4.6 (end
> >>> of April) and as the following link shows, it is also available in the
> >>> current 4.5 branch:http://gcc.gnu.org/ml/gcc-patches/2010-06/msg01275..html
> >>> Thus, if your gfortran version does not have LTO, it probably means that
> >>> it is not enabled. It is only enabled if binutils >= 2.20.1 are found at
> >>> compile time. Additionally, one might need to use --enable-lto during
> >>> configure time.
> >>> You did not state where you got the binaries from, but seemingly from a
> >>> place with out-dated binutils and/or where --enable-lto was not used as
> >>> configure option.
> >>> Tobias
> >> If he used the version of gfortran that I recently built and made
> >> available via a link on the wiki, then it was not built with
> >> --enable-lto.  I will rebuild a version today with that option enabled
> >> and repost.- Hide quoted text -
>
> >> - Show quoted text -
>
> > That will be most helpful. Thanks a lot! Once you build it, can you
> > also send me the link. If I remembered correctly, I used
> >http://users.humboldt.edu/finneyb/gfortran-windows.exe
>
> The new build of gfortran for windows is now available at the same link
> as you list above.  I tested it with -flto and it produced an executable
> that ran fine.  The compiler will also install the latest version of
> binutilts (2.20.51).- Hide quoted text -
>
> - Show quoted text -

Thanks. I downloaded the updated build. However, when I compile the
codes according to case 3 given by Steve's post. I get the following
error message:
c:/program files/gfortran/bin/../lib/gcc/i586-pc-
mingw32/4.6.0/../../../libmingw
32.a(main.o):main.c:(.text+0xd2): undefined reference to `WinMain(a)16'
collect2: ld returned 1 exit status

From: e p chandler on

>"Hifi-Comp" wrote
>> baf wrote:
>> The new build of gfortran for windows is now available at the same link
>> as you list above. I tested it with -flto and it produced an executable
>> that ran fine. The compiler will also install the latest version of
>> binutilts (2.20.51).

>Thanks. I downloaded the updated build. However, when I compile the
>codes according to case 3 given by Steve's post. I get the following
>error message:
>c:/program files/gfortran/bin/../lib/gcc/i586-pc-
>mingw32/4.6.0/../../../libmingw
>32.a(main.o):main.c:(.text+0xd2): undefined reference to `WinMain(a)16'
>collect2: ld returned 1 exit status

This version of gfortran compiled and ran properly on my Vista(32) system,
but only after I uninstalled
a previously installed g95. Until then I got a number of linker errors.

Very strange. WinMain is the entry point for a Windows Application (GUI) not
the usual console application.
(IIRC CRTstartup). It's not the default setting. Required options would
be -mwindows OR --Wl,subsystem,windows

Maybe you had an installation problem or a software collision with something
else, like my system.
-- e




From: Hifi-Comp on
On Jun 21, 12:38 am, "e p chandler" <e...(a)juno.com> wrote:
> >"Hifi-Comp" wrote
> >> baf wrote:
> >> The new build of gfortran for windows is now available at the same link
> >> as you list above. I tested it with -flto and it produced an executable
> >> that ran fine. The compiler will also install the latest version of
> >> binutilts (2.20.51).
> >Thanks. I downloaded the updated build. However, when I compile the
> >codes according to case 3 given by Steve's post. I get the following
> >error message:
> >c:/program files/gfortran/bin/../lib/gcc/i586-pc-
> >mingw32/4.6.0/../../../libmingw
> >32.a(main.o):main.c:(.text+0xd2): undefined reference to `WinMain(a)16'
> >collect2: ld returned 1 exit status
>
> This version of gfortran compiled and ran properly on my Vista(32) system,
> but only after I uninstalled
> a previously installed g95. Until then I got a number of linker errors.
>
> Very strange. WinMain is the entry point for a Windows Application (GUI) not
> the usual console application.
> (IIRC CRTstartup). It's not the default setting. Required options would
> be -mwindows   OR   --Wl,subsystem,windows
>
> Maybe you had an installation problem or a software collision with something
> else, like my system.
> -- e

How to uninstall? I cannot find anything in the program list through
remove/add programs so that I can uninstall it. I guess simple delete
the directory and path in the environment variables will not work.
From: fj on
On 21 juin, 04:24, Hifi-Comp <wenbinyu.hea...(a)gmail.com> wrote:
> On Jun 20, 3:21 am, baf <b...(a)nowhere.net> wrote:
>
>
>
> > Hifi-Comp wrote:
> > > On Jun 19, 1:31 pm, baf <b...(a)nowhere.net> wrote:
> > >> Tobias Burnus wrote:
> > >>> Hifi-Comp wrote:
> > >>>> I am using gfortran on windows. -flto is not available for win32 gcc
> > >>>> version 4.6.0 20100524.
> > >>> Actually, that surprises me - I am pretty sure that LTO support for
> > >>> MacOS and Windows went in. Let me search ...
> > >>> ... and I remembered correctly. It was enabled for Windows on 4.6 (end
> > >>> of April) and as the following link shows, it is also available in the
> > >>> current 4.5 branch:http://gcc.gnu.org/ml/gcc-patches/2010-06/msg01275.html
> > >>> Thus, if your gfortran version does not have LTO, it probably means that
> > >>> it is not enabled. It is only enabled if binutils >= 2.20.1 are found at
> > >>> compile time. Additionally, one might need to use --enable-lto during
> > >>> configure time.
> > >>> You did not state where you got the binaries from, but seemingly from a
> > >>> place with out-dated binutils and/or where --enable-lto was not used as
> > >>> configure option.
> > >>> Tobias
> > >> If he used the version of gfortran that I recently built and made
> > >> available via a link on the wiki, then it was not built with
> > >> --enable-lto. I will rebuild a version today with that option enabled
> > >> and repost.- Hide quoted text -
>
> > >> - Show quoted text -
>
> > > That will be most helpful. Thanks a lot! Once you build it, can you
> > > also send me the link. If I remembered correctly, I used
> > >http://users.humboldt.edu/finneyb/gfortran-windows.exe
>
> > The new build of gfortran for windows is now available at the same link
> > as you list above. I tested it with -flto and it produced an executable
> > that ran fine. The compiler will also install the latest version of
> > binutilts (2.20.51).- Hide quoted text -
>
> > - Show quoted text -
>
> Thanks. I downloaded the updated build. However, when I compile the
> codes according to case 3 given by Steve's post. I get the following
> error message:
> c:/program files/gfortran/bin/../lib/gcc/i586-pc-
> mingw32/4.6.0/../../../libmingw
> 32.a(main.o):main.c:(.text+0xd2): undefined reference to `WinMain(a)16'
> collect2: ld returned 1 exit status

I got the same message this morning because I forgot to link with the
main program !
From: e p chandler on

"Hifi-Comp" <wenbinyu.heaven(a)gmail.com> wrote in message
news:af0215a4-39c8-4b69-9e09-a1cd7a495924(a)x21g2000yqa.googlegroups.com...
On Jun 21, 12:38 am, "e p chandler" <e...(a)juno.com> wrote:
> >"Hifi-Comp" wrote
> >> baf wrote:
> >> The new build of gfortran for windows is now available at the same link
> >> as you list above. I tested it with -flto and it produced an executable
> >> that ran fine. The compiler will also install the latest version of
> >> binutilts (2.20.51).
> >Thanks. I downloaded the updated build. However, when I compile the
> >codes according to case 3 given by Steve's post. I get the following
> >error message:
> >c:/program files/gfortran/bin/../lib/gcc/i586-pc-
> >mingw32/4.6.0/../../../libmingw
> >32.a(main.o):main.c:(.text+0xd2): undefined reference to `WinMain(a)16'
> >collect2: ld returned 1 exit status
>
> This version of gfortran compiled and ran properly on my Vista(32) system,
> but only after I uninstalled
> a previously installed g95. Until then I got a number of linker errors.
>
> Very strange. WinMain is the entry point for a Windows Application (GUI)
> not
> the usual console application.
> (IIRC CRTstartup). It's not the default setting. Required options would
> be -mwindows OR --Wl,subsystem,windows
>
> Maybe you had an installation problem or a software collision with
> something
> else, like my system.
> -- e

>How to uninstall? I cannot find anything in the program list through
>remove/add programs so that I can uninstall it. I guess simple delete
>the directory and path in the environment variables will not work.

run uninstaller.exe in the gfortran folder
but the above should work too

see reply to follow up message