g95 in Windows 7

119 views
Skip to first unread message

Rob

unread,
Nov 2, 2011, 8:29:30 PM11/2/11
to gg95
I installed g95-Cygwin-41.exe a few days ago and just got it to
compile a test program.
There seems to be a problem with the path environment variable, I've
read older comments
on this newsgroup and followed some of the advice. Some questions:

Do all the path statements go in the user section, or does one (the
library path)
or any others go in the system section?

Using --print-search-dirs I found that g95 was looking in the 4.1.1
folder
for everything even though that was never specified in any of the path
statements I used (I tried the long path name ending in 4.1.2 as was
in
one of the help pages).

So right now g95 is in C:\g95\bin, programs with the .for extension
are
also there, and I had to copy all the .o and .a files in the lib
folder to
the 4.1.1 folder to get things to run. (Before I did that I got it to
run
by using the -L command to specify where the library files were).

So it compiles a simple program but it's a little clunky, I wonder if
what's going to happen when I try to write a program that requires
input and output files.

Any suggestions appreciated.

Rob

Jean Santos

unread,
Apr 9, 2012, 9:30:15 AM4/9/12
to gg...@googlegroups.com
Hi Rob,

I had the same problem and could find pieces of information that helped me to apparently solve it.

Go to control panel>system and security>system>edit environment variables

There you have to add to the variable PATH the actual path where the g95/bin folder is at the begining of the variable

c:\g95\bin\

Then you create or edit the G95_LIBRARY_PATH variable including the path of the g95/lib and the path of g95\lib\gcc-lib\i686-pc-mingw32\4.1.2

C:\g95\lib;C:\g95\lib\gcc-lib\i686-pc-mingw32\4.1.2

In my case this solved the problem and I am able to compile the programs in any folder without complains.

Cheers,
Jean

Jean Santos

unread,
Apr 9, 2012, 9:33:13 AM4/9/12
to gg...@googlegroups.com
I forgot to tell ... I did it for user and system variables ... 

Cheers again,
Jean
Reply all
Reply to author
Forward
0 new messages