home *** CD-ROM | disk | FTP | other *** search
- ===============================================================================
- install.doc emx 0.8f INSTALLATION GUIDE 03-Jan-1993
- ===============================================================================
- Copyright (c) 1990-1993 by Eberhard Mattes
-
- Welcome to emx 0.8f, an environment for creating 32-bit programs for
- OS/2 2.0 (and DOS). You can use the GNU C compiler for compiling
- programs.
-
- To use the GNU C compiler with emx, you need at least
-
- emxdev.zip files required for developing programs with emx,
-
- gnudev.zip the GNU C compiler, the GNU debugger, and other tools
- (it should also be possible to use a different C compiler;
- in fact I first used the Xenix386 C compiler)
-
- gppdev.zip additional files for GCC required for compiling C++
- programs
-
- gobjcdev.zip additional files for GCC required for compiling
- programs written in the Objective C language
-
- and
-
- unzip.exe a free program for unpacking ZIP files
-
- The following packages are optional:
-
- emxlib.zip emx library sources
- emxtest.zip test programs (used for testing emx and the libraries)
- gnudoc.zip documentation for GNU programs (texinfo sources)
- gnuinfo.zip GNU texinfo (includes info file browser)
- gnupat.zip patches for GNU sources
- gnusrc.zip patched GNU sources (ld, ar, nm, size, strip, objdump,
- termcap)
- gccsrc1.zip patched GNU sources (gcc 2.3.3, part 1)
- gccsrc2.zip patched GNU sources (gcc 2.3.3, part 2)
- gassrc.zip patched GNU sources (gas 1.38.1)
- gdbsrc.zip patched GNU sources (gdb 4.7)
- gppsrc.zip patched sources of libg++ 2.2
- bsddev.zip BSD libraries (curses etc.)
- bsddoc.zip documentation for BSD libraries
- bsdsrc.zip source for BSD libraries
-
- You should install all the packages on the same drive. For instance,
- use
-
- c:
- cd \
- unzip -d emxdev
-
- to install the emxdev.zip package on drive C:. PKUNZIP cannot be
- used. All the files will be installed in the \emx subdirectory or in
- subdirectories thereof. The other packages are installed the same
- way.
-
- If there's an older version of emx already installed, you should
- delete the old version or rename the old directory. Installing a new
- version over an old version is not recommended. For instance, the
- omflib batch file (see below) won't build new versions of the
- libraries if the .lib files already exist. That is, you would
- continue to use the .lib files of the previously installed emx
- version.
-
- If you want to develop programs on a drive different from the drive
- where emx is installed, you have to set the C_INCLUDE_PATH and
- LIBRARY_PATH environment variables, for instance,
-
- set C_INCLUDE_PATH=c:/emx/include
- set LIBRARY_PATH=c:/emx/lib
-
- If you want to compile C++ programs, set CPLUS_INCLUDE_PATH as well:
-
- set CPLUS_INCLUDE_PATH=c:/emx/include.cpp;c:/emx/include
-
- The genclass utility needs the following environment variable:
-
- set PROTODIR=c:/emx/include.cpp/gen
-
- If you want to compile programs written in the Objective C language,
- set OBJC_INCLUDE_PATH as well:
-
- set OBJC_INCLUDE_PATH=c:/emx/include
-
- To use GDB (the GNU debugger) and info (the GNU info browser) and other
- programs that use termcap, set the TERM and TERMCAP environment
- variables:
-
- set TERM=mono
- set TERMCAP=c:/emx/etc/termcap.dat
-
- Set the INFOPATH environment variable for info:
-
- set INFOPATH=c:/emx/info
-
- OS/2 users should set the environment variables in config.sys, DOS
- users should set the environment variables in autoexec.bat. Beware of
- blanks at the end of the lines!
-
- To finish the installation, add c:\emx\bin (insert the correct drive
- letter) to your PATH. Add c:\emx\dll (insert the correct drive
- letter) to the LIBPATH statement in your config.sys file. Reboot your
- computer to enable the new LIBPATH statement and the new environment
- variables.
-
- To create the OMF libraries (for linking with LINK386), type the
- following commands after installing emx:
-
- cd \emx\lib
- omflib
-
- The omflib batch file builds .lib files from .a files. Already
- existing .lib files are not rebuilt. If you install (after running
- omflib) a package containing additional .a files , you should run
- omflib again to build the .lib files for the new package.
-
- If OS/2 says
-
- SYS1804: The system cannot find the file EMX.
-
- when running a program compiled for emx, you haven't set LIBPATH
- correctly.
-
-
- Compiling a sample program
- --------------------------
-
- Install the emxtest.zip package:
-
- c:
- cd \
- unzip -d emxtest
-
- Compile the sieve program (optimizer enabled):
-
- cd \emx\test
- gcc -O2 -o sieve.exe sieve.c
-
- Run the sieve program:
-
- sieve
- sieve 100000
- sieve -p 100
-
-
- Sample debugging session
- ------------------------
-
- Compile the sieve program for debugging:
-
- cd \emx\test
- gcc -g -o sieve.exe sieve.c
-
- Start the debugger and step through some lines:
-
- [D:\EMX\TEST]gdb sieve.exe
- GDB is free software and you are welcome to distribute copies of it
- under certain conditions; type "show copying" to see the conditions.
- There is absolutely no warranty for GDB; type "show warranty" for details.
- GDB 4.7, Copyright 1992 Free Software Foundation, Inc...
- (gdb) set arg 10 <- set command line
- (gdb) b isqrt <- set breakpoint
- Breakpoint 1 at 0x1004e: file sieve.c, line 45.
- (gdb) run <- start program
- Starting program: d:/emx/test/sieve.exe 10
-
- Breakpoint 1, isqrt (x=10) at sieve.c:45
- 45 l = 1; r = x;
- (gdb) s <- stop over one line
- 46 while (l < r)
- (gdb) l <- list source
- 41 static ULONG isqrt (ULONG x)
- 42 {
- 43 ULONG l, r, m;
- 44
- 45 l = 1; r = x;
- 46 while (l < r)
- 47 {
- 48 m = (l+r) / 2;
- 49 if (m > 46340) m = 46340;
- 50 if (m*m < x)
- (gdb) disp l <- watch variable
- 1: l = 1
- (gdb) disp r <- watch variable
- 2: r = 10
- (gdb) s 5 <- step over five lines
- 53 r = m-1;
- 2: r = 10
- 1: l = 1
- (gdb) p m*m <- show expression
- $1 = 25
- (gdb) cont <- continue program
- Continuing.
- 4 primes <- output of program
-
-
- Program exited normally.
- (gdb) q <- quit gdb
-
- [D:\EMX\TEST]
-
-
- Viewing the GNU on-line manuals
- -------------------------------
-
- To view the GCC and GDB manuals, unpack gnudoc.zip and gnuinfo.zip and
- install info (see install.doc). Use GNU makeinfo to create info files
- for on-line help from the texinfo files.
-
- To create info files for the GCC manual, type:
-
- cd \emx\gnu\doc
- set emxopt=-t
- makeinfo gcc.tex -o /emx/info/gcc.inf
- makeinfo cpp.tex -o /emx/info/cpp.inf
-
- To create info files for the GDB manual, type:
-
- cd \emx\gnu\doc
- set emxopt=-t
- makeinfo gdb-all.tex -o /emx/info/gdb.inf
-
- To create info files for the texinfo manual, type:
-
- cd \emx\gnu\doc
- set emxopt=-t
- makeinfo texinfo2.tex -o /emx/info/texinfo.inf
-
- To create info files for libg++, type:
-
- cd \emx\gnu\doc
- set emxopt=-t
- makeinfo libgpp.tex -o /emx/info/libgpp.inf
- makeinfo iostream.tex -o /emx/info/iostream.inf
-
- After creating the info files, you can use GNU info (see gnudev.doc
- for details) or GNU Emacs to view the info files.
-
-
- Printing the GNU manuals
- ------------------------
-
- To print the manuals, you have to unpack gnudoc.zip and gnuinfo.zip.
- Additionally, you have to install TeX. Of course, I recommend emTeX
- (available for anonymous ftp from ftp.uni-stuttgart.de, directory
- soft/tex/systems/pc/emtex). The following instructions assume that
- you're using emTeX (with emTeX386).
-
- To typeset the GCC documentation, type
-
- cd \emx\gnu\doc
- makedvi gcc
-
- This creates the following files:
-
- cpp.dvi GNU C preprocessor manual
- gcc.dvi GNU C compiler manual
-
- To typeset the GDB documentation, type
-
- cd \emx\gnu\doc
- makedvi gdb
-
- This creates the following files:
-
- refcard.dvi GDB reference card
- gdb-all.dvi GDB manual
- gdbint.dvi GDB internals (you might want to delete this one)
-
- To typeset the texinfo documentation, type
-
- cd \emx\gnu\doc
- makedvi texinfo
-
- This creates the following file:
-
- texinfo2.dvi texinfo manual
-
- To typeset the libg++ documentation, type
-
- cd \emx\gnu\doc
- makedvi libgpp
- makedvi iostream
-
- This creates the following files:
-
- libgpp.dvi libg++ manual
- iostream iostream manual
-
- --------------------------- END OF INSTALL.DOC ------------------------------
-