PC TOOLS (GNU-Compilers)
This page describes the tools used to compile the examples files
in the opt-L (local optimization and non-linear
fit) page.
We used the GNU-Compilers because of its universal access and
portability from the PC to UNIX platforms and vice-versa.
Other compilers may be used, but in that case you may need to change
the Makefiles and perhaps the source-code.
Please note that the goal of this page is to provide with an easy-to
use way to install and use the compilers. For more particularized
installations, as well as for full documents on the compilesrs, see the
"Links" section. The compilers used here are not necessarily up-to-date
nor optimized for your particular use, but there are a valuable starting
point.
Fortran G77 compiler
We had problems using the g77 compiler shipped withing the EGCS package,
therefore, we needed an independent installation. This installation is
the only you need if wanted to compile only Fortran (not C) code in your
PC.
To install the g77 compiler:
To use the g77 compiler:
- Open an MS-DOS window
- Execute: c:\g77\g77setup.bat
- Execute: g77 -o myfile.exe myfile.f
GNU C compilers (gcc and g++)
Here we show how to install the GNU C compilers with some additional
stuff needed to create callable DLL files (for example, for being used
from IDL).
The packages to be installed are: MINGW32-Compiler, EGCS-1.1.1-Compiler
and dllhelpers-0.2.1.
To install them, you can select between the Fast installation
or the detailed installation options:
Fast installation of the GNU-Compilers:
- Copy the
install.exe to your PC and double-click on it. Confirm the defaults.
As a result, your should get a C:\MINGW32 directory with lots
of exe files.
- Run the batch-file C:\MINGW32\Install.bat and also confirm the
questions of the Unzipper.
Detailed installation of the GNU-Compilers:
- MINGW32-Compiler and WIN32-Help-File:
Download all the ZIP-Files from
ftp.esrf.fr/pub/expg/opt/pc-tools/mingw32/
and unzip them to the directory C:\Mingw32.
- EGCS-1.1.1-Compiler:
Download all the zip files from
ftp.esrf.fr/pub/expg/opt/pc-tools/egcs-1.1.1/
and unzip them to the directory C:\Mingw32\EGCS-1.1.1.
- Copy the executables from
C:\EGCS-1.1.1\lib\gcc-lib\i386-mingw32\egcs-2.91.60\*.exe
to C:\MINGW32\bin\*.*
- dllhelpers-0.2.1:
Download all the zip files from
ftp.esrf.fr/pub/expg/opt/pc-tools/dllhelpers-0.2.1/
and unzip them to the directory C:\Mingw32\dllhelpers-0.2.1
-
Now edit the autoexec.bat of your PC and add the following lines:
set C_INCLUDE_PATH=C:\MINGW32\include
set CPLUS_INCLUDE_PATH=C:\MINGW32\include\g++;C:\MINGW32\include
set LIBRARY_PATH=C:\MINGW32\lib
set PATH=C:\MINGW32\BIN;%PATH%
rem GNU Bison
set BISON_SIMPLE=C:\MINGW32\share\bison.simple
set BISON_HAIRY=C:\MINGW32\share\bison.hairy
PATH=c:\egcs-1.1.1\bin;%PATH%
REM
REM replace c:\egcs-1.1.1 with whatever your installation root may be.
REM GCC_EXEC_PREFIX is optional, but having it here doesn't hurt.
REM
set GCC_EXEC_PREFIX=C:\EGCS-1.1.1\lib\gcc-lib\
set PATH=C:\MINGW32\dllhelpers-0.2.1\mingwbin;%PATH%
Quick help
To get some help about the compilers options
have a look to the text files in the directory:
ftp.esrf.fr/pub/expg/pc-tools/Comp-Set
Links
The information and files of this page have been obtained from:
[Back to opt-L]
Last modified: 17 August 1999
Christoph Michetschlaeger
and
M. Sanchez del Rio (srio@esrf.fr)