Re: Gfortran on Windows (was Re: Fortran Newbie - Where to start?)

From: E P Chandler (epc8_at_juno.com)
Date: 08/21/04


Date: 20 Aug 2004 19:13:37 -0700


"beliavsky@aol.com" wrote:

> Gfortran, the other open source Fortran 95 project, now runs on Windows,
> according to http://f77.linksysnet.com/ . I don't know how to install it.
> When I download gfortran.exe from http://gfortran.org/cygwin/2004232/gfortran/bin/
> and run gfortran.exe from the command line, I get the error message
>
> "The procedure entry point __getreent could not be located in the dynamic
> link library cygwin1.dll"
>
> I have cygwin1.dll in my path at c:\windows. I cannot install the latest
> Cywgin from http://sources.redhat.com/cygwin/ because (I think) of the corporate
> firewall.
>

Can you use the normal Cygwin setup.exe from http://www.cygwin.com ?

a more recent URL for gfortran is http://gfortran.org/
and you can obtain the package from
http://gfortran.org/cygwin/20040804/gfort0804.zip

The latest version seems to require
1) base cygwin
2) binutils & gcc from devel
3) gmp from libs (An earler snapshot today did not.)

After unpacking the .zip file and adding the paths to the root of the
unpacked .zip and to \cygwin\bin, I was able to compile and execute a
simple 'hello, world' program without any problem.

-------
A minimal test setup to compile 'hello, world' which also worked for
me was:

1) install base cygwin + devel/binutils + devel/gcc + libs/gmp

copy to working directory (eg. \temp)

from \cygwin\bin:

as.exe
ld.exe
cygiconv-2.dll
cygintl-2.dll
cygwin1.dll
cyggmp-3.dll

from http://gfortran.org/cygwin/20040804/irun

/bin/gfortran.exe
/lib/libfortran.a
/lib/libgfortranbegin.a
/lib/gcc/i686-pc-cygwin/3.5.0/libgcc.a
/libexec/gcc/i686-pc-cygwin/3.5.0/f951.exe

of course hello.f95 is just

print *,'hello, world'
end

then from \temp directory do:

gfortran -s -o hello.exe -L. hello.f95

Hope this helps (I like to test things with as little installed as
possible.)

(-s reduces the size of the .exe file, -L. sets the library directory
to the current directory).



Relevant Pages

  • Re: How to turn off compiler/linker timestamping?
    ... > You can see the time stamp by running dumpbin /all on the executable. ... > "Michael Schwab" wrote in message ... compile. ... >> embedded in the exe file itself. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: VB 6 & VS?
    ... do I now make an .exe file with VB6? ... The registry problem may be a permissions issue, ... To compile, open Options and select the Compile tab. ... But first I suggest you do a "Run with full compile" within the IDE to ...
    (microsoft.public.vb.general.discussion)
  • Re: trivial question about building exe
    ... references to external dlls. ... exe file, so that I can send it to another machine and it works. ... If I understand you correctly you want to compile all dlls to one file. ... This is not the way you should use dynamic libraries but if you are sure you know what you are doeing you can theoretically add all the libraries to the resources of your application and get them from the resources and save them to disc before your application will use them. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: VB IDE Crashes during Compile/Make
    ... I also have one app that won't compile on the dev machine but will ... compile on another machine accessing the project files across the ... >Although I'm running XP and VS6, we have tried to make the exe file on ...
    (microsoft.public.vb.general.discussion)
  • Re: Lost - Anyone found Newsgroup entries for 31 Jan?
    ... in that to get at the video file an .exe file ... unpacking of the files. ... point I stopped my follow-through of the download. ...
    (uk.media.tv.misc)