The back end and libraries are now up for general testing on a variety of boxes and operating systems. The tarball is usually updated as the web page is. To download and install g95 on unix systems, run the following command (originally from Joost Vandevondele): wget -O - http://ftp.g95.org/g95-x86-linux.tgz | tar xvfz - This will create a directory named 'g95-install' in the current directory. Run (or better yet make an appropriate symbolic link to) ./g95-install/bin/i686-pc-linux-gnu-g95 in order to run g95.

# Installing G95 under Windows FAQ

Most problems encountered by new users when installing g95 in Windows are solved by setting the `PATH` and the correct environment variable for your package, either `LIBRARY_PATH` or `G95_LIBRARY_PATH`.

Q. 1.   How do I use the Control Panel to edit PATH and add environment variables?

A.    See the discussion at:
Q. 2.
Will g95 conflict with gfortran?

A.    Installing the g95-MinGW.exe package may cause problems for gfortran as both compilers recognize the LIBRARY_PATH environment variable. Use the g95-MinGW-41.exe
package instead. It uses G95_LIBRARY_PATH to find its library files instead of
LIBRARY_PATH. This does not interfere with either gfortran or gcc.

Q. 3.    I installed g95-MinGW-41.exe but when I compiled my code the process stopped
with the message:

`ld: unrecognized option `'--sysroot='`
A.    1. Check if g95 is calling the correct version of ld.exe by adding -v when compiling.
2. Try adding the g95 directory (i.e., c:\g95\bin; c:\g95\lib\gcc-lib\i686-pc-mingw32\4.1.2;) at the beginning of your PATH environment variable. If that fails, delete g95 entirely, and reinstall. Answer "yes" to all the dialogues during the install.

Q. 4.     I executed the g95 installer on my XP Home system. Everything installed fine but the compiler complained with the message:
`g95: installation problem, cannot exec 'f951': Invalid argument`
A.     1. If you downloaded the g95-MinGW.exe installer add LIBRARY_PATH to your user set of environment variables and set it to point to \g95\lib;\g95\lib\gcc-lib\i686-mingw32\4.0.4\. If you downloaded the g95-MinGW-41.exe installer add G95_LIBRARY_PATH to your user set of environment variables and set it to point to \g95\lib;\g95\lib\gcc-lib\i686-mingw32\4.1.2\

2. If it still fails, try copying f951.exe from its \g95\lib\gcc-lib\i686-mingw32\4.x.x\  location to \g95\bin

Q. 5.     I installed g95-MinGW -41.exe on XP Pro. The environment variables are correctly set. I got the error:
`g95: installation problem, cannot exec 'as': Invalid argument`
A.     Try copying \g95\bin\as.exe and \g95\bin\ld.exe to \g95\lib\gcc-lib\i686-mingw32\4.2.1\

Q. 6.      I can't get g95 to work. My Path= ... lots of stuff and then ...;c:\g95\bin;C:\g95\lib\gcc-lib\i686-pc-mingw32\4.1.2;

A.    1. Add the g95 directory (i.e., c:\g95\bin) at the beginning of your PATH environment variable instead of at the end.
2. Add G95_LIBRARY_PATH to your user set of environment variables and set it to point to \g95\lib;\g95\lib\gcc-lib\i686-mingw32\4.1.2

Q. 7.    I installed g95-MinGW-41.exe and compiled "g95 test.f".
It produced the error message
:
`g95: _spawnvp: Invalid argument`
A.     It looks like you need to add the g95 directory to the beginning of your PATH environment variable. This is usually done through the Control Panel. Vista provides  setx.exe, which is similar to the Linux SETENV utility. With SETX you can set environment variables permanently in a CMD window with:

SETX PATH c:\g95\bin;%PATH% /m

SETX G95_LIBRARY_PATH c:\g95\lib;c:\g95\lib\gcc-lib\i686-mingw32\4.1.2 /m

The /m parameter sets these values for all users. Exit and start a new CMD window. Check whether the PATH and G95_LIBRARY_PATH environment variables are set correctly by typing:

`echo %PATH%  `
`echo %G95_LIBRARY_PATH%`

The setx.exe utility is available for Windows XP in Service Pack 2.

Q. 8.     I installed g95 but when I try compiling in a cmd window: 'g95 hello.f90' I see the error message shown below. Where is my error?
`ld: crt2.o: No such file: No such file or directory`
A.     1. If you downloaded the g95-MinGW.exe package, add LIBRARY_PATH to your user set of environment variables and set it to point to: \g95\lib;\g95\lib\gcc-lib\i686-mingw32\4.0.4
If the problem persists, copy copy the *.o and *.a files in g95\lib\ to:
`	\g95\lib\gcc-lib\i686-pc-mingw32\4.0.4`

2. If you downloaded the g95-MinGW-41.exe package, add G95_LIBRARY_PATH to your user set of environment variables and set it to point to: \g95\lib;\g95\lib\gcc-lib\i686-mingw32\4.1.2\
If the problem persists, copy the *.o and *.a files in g95\lib\ to:
`	\g95\lib\gcc-lib\i686-pc-mingw32\4.1.2`

Q. 9.     Why does the g95 Windows build require environment variables to be set?

A.     The g95 library and several supporting programs are separate files from the g95 compiler, some of which may be located in different directories. The environment variable LIBRARY_PATH or G95_LIBRARY_PATH helps the compiler and linker find those files.

Q. 10.    I tried installing g95, and now I can't see it. Where is it?

http://ftp.g95.org/g95-MinGW-41.exe

You can "save" the file on your computer somewhere, then find it in Windows Explorer, click on it to run the installer. It will give you several options in pop-up windows, including one to select an install directory. Try selecting c:\g95 as the install directory. There are three directories created in c: \g95, bin, doc, and lib. You will find some additional information in the doc directory. Please consult the README.txt file.

If you are looking for an icon on your desktop, there won't be one. After running the installer, you have to open a CMD window to use g95. You can do this by clicking on Start, Run. Or, in Vista you can right-click on any folder while holding down the shift key, and select "Open Command Window Here" in the menu.

Q. 11.    I clicked the link http://ftp.g95.org/g95-MinGW.exe, and I saved the program in a folder under C:/. Then I clicked "run" at the start menu. I typed "g95." Then it shows me the message:
```
'g95' is not recognized as an internal or external command, operable program or batch file' ```
A.      The installer you downloaded has to be executed. It runs a script to install g95 in the directory you choose. Then you can use g95.

 Abramowitz & Stegun "Handbook of Mathematical Functions" Now an IOS App home \\ downloads \\ documents \\ archives links \\ contributing \\ status
{"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9878073334693909, "perplexity": 9696.687839268556}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-43/segments/1508187824570.79/warc/CC-MAIN-20171021043111-20171021063111-00415.warc.gz"}