delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/07/12/20:09:26

Date: Sat, 12 Jul 1997 20:09:24 -0400 (EDT)
Message-Id: <199707130009.UAA23390@delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp-workers AT delorie DOT com
Subject: [kifox AT mail DOT geocities DOT com: Subject: Re: gcc and make.exe]

Comments?

------- Start of forwarded message -------
X-NUPop-Charset: English
Date: Sat, 12 Jul 1997 09:18:06 -0600 (CST)
From: "chris lee" <kifox AT mail DOT geocities DOT com>
Sender: kifox AT mail DOT geocities DOT com
Return-Receipt-To: kifox AT mail DOT geocities DOT com
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: dj AT delorie DOT com, kifox AT hotmail DOT com
Subject: Subject: Re: gcc and make.exe

>> The major problem with the readme.1st file is that it's clear as mud. It
>> needs to be rewritten.

>Go right ahead.  If it's better than the current one, I'll replace it.

Here's the rewritten readme.1st file (didn't think I'll actually
do it, did you :D) You can use it as it is, or redit it, as I still
think it needs some more work done to it.

I'm sending it as an attachment to this message...

This is the README.1ST file for DJGPP Version 2.01

DJGPP is a free environment for developing 32-bit protected mode
software in C/C++ under MS-DOS.

Status and other information (online docs, FAQ, mail archives) are
made available through the djgpp web pages at http://www.delorie.com/.
Discussion of DJGPP and questions about its usage or features are
through the djgpp news group (post to comp.os.msdos.djgpp) and djgpp
mailing list (send your messages to <djgpp AT delorie DOT com>, subscribe
through <listserv AT delorie DOT com>).  Look on the web page for information
on the latest versions of various DJGPP packages.

Version information is in manifest/*.ver within each zip.  Contents
are in manifest/*.mft in each zip.

A different, more complete (and longer) tutorial on how to get started
with DJGPP was written by An <avly AT remus DOT rutgers DOT edu> and is available
by anonymous ftp from x2ftp.oulu.fi in the
/pub/msdos/programming/djgpp2 directory, filename djtut-bm.zip.  You
can also read it on-line by pointing your Web browser to this URL:

        http://remus.rutgers.edu/~avly/djgpp.html


- ----------------------------
GETTING STARTED WITH DJGPPP
(What you should download)
- ----------------------------

The info below is the minimum new users should know to get them up and
running with DJGPP.  Please read the DJGPP documentation and the FAQ
list for further details.  New users are encouraged to read the FAQ
list in its entirety

The minimum DJGPP installation for most users who wish to compile C programs
will consist of the following files from either SimTel or an Simtel mirror
site:

v2/readme.1st
v2/djdev201.zip
v2gnu/bnu27b.zip
v2gnu/gcc2721b.zip

If you intend to work in DOS, or run progams created with DGJPPP from DOS
you'll need the following archive in addition to the ones mentioned above:

v2misc/csdpmi3b.zip

If you wish to compile C++ programs, you'll need to download and install
the following archives in addition to the ones mentioned above for C :

v2gnu/gpp2721b.zip
v2gnu/lgp271b.zip

For those who find that they need GNU Make, the archive is located found in:

v2gnu/mak375b.zip

In general, download the binary distributions only; most people
will find that they don't need the source distributions.

- ---------------------------------
INSTALLING DGJPPP ON YOUR SYSTEM
- ---------------------------------

1. Create a directory for DJGPP, say C:\DJGPP.  If you have version
   1.x installed, it's best to delete the contents of its `bin/'
   subdirectory or move it to another directory (not on your PATH),
   and delete everything else from that installation.  (Some of the
   problems reported by users of DJGPP v2 were caused by inadvertently
   mixing it with old v1.x programs.)  The only program from v1.x that
   you should keep is `go32.exe'.

2. Unzip the zip files from that directory, preserving the directory
   structure.  For example:

        pkunzip -d gcc2721b
  or
        unzip386 gcc2721b

3. After unzipping all the zip files, set the DJGPP environment
   variable to point to the file DJGPP.ENV in the main DJGPP
   installation directory and add its BIN subdirectory to your PATH.
   Assuming your DJGPP installation is rooted at C:\DJGPP, put these
   two lines into your autoexec.bat file:

        set DJGPP=C:\DJGPP\DJGPP.ENV
        set PATH=C:\DJGPP\BIN;%PATH%

4. Run the go32-v2.exe program without arguments:

        go32-v2

   It should report how much DPMI memory and swap space can DJGPP use
   on you system, like this:

        DPMI memory available: 8020 Kb
        DPMI swap space available: 39413 Kb

   (The actual numbers will vary according to amount of RAM installed
   on your system, the available disk space and the DPMI server.)  If
   go32-v2 reports less than 4 MBytes of DPMI memory, read section 3.8
   of the FAQ.  (If you have more than that, but want to get the
   optimal performance from your system, read that section anyway.)


- ------------------------------------
Compiling C/C++ programs using DJGPP
- ------------------------------------

Most of the on-line documentation is organized in a special hypertext
format used by the GNU project.  Each package brings its docs which
are files with .iNN extension and are unzipped into the info/
subdirectory of your main DJGPP installation directory.  To browse
these docs, get and unzip the file txi390b.zip, then run info.exe.  If
you don't know how to use Info, press `?'.


GCC is a command-line compiler, which you invoke from DOS command
line.  To compile and link a single-file C program, use a command like
this:

        gcc myfile.c -o myfile.exe -lm

The -lm links in the lib/libm.a library (trig math) if needed.  (Link
order is significant, so if you need libm.a, always put `-lm' at the
end of the command line.)

To compile a C or C++ source file into an object file, use this
command line:

        gcc -c -Wall myfile.c  (for C source)
  or
        gcc -c -Wall myfile.cc (for C++ source)

This produces the object file myfile.o.  The `-Wall' switch turns on
many useful warning messages which are especially beneficial for new
users of GCC.  (Other C++ extensions, like .cpp, are also supported,
see section 8.4 of the FAQ for details.)

To link several C object files into an executable program, use a
command line such as this:

        gcc -o myprog.exe mymain.o mysub1.o mysub2.o

This produces `myprog.exe' which can be run from the DOS prompt.

To link a C++ program, use gxx instead of gcc, like this:

        gxx -o myprog.exe mymain.o mysub1.o mysub2.o

This will automatically search the C++ libraries, so you won't need to
mention them on the command line.

You can also combine the compilation and link steps, like this:

        gcc -Wall -o myprog.exe mymain.c mysub1.c mysub2.c

Further info about the plethora of GCC switches can be found in the
GCC on-line documentation.  To begin reading it, install the Texinfo
package (txi390b.zip, see the ``On-line docs'' section below) and type
this:

        info gcc invoking


- -------------------------------------------
Debugging C/C++ programs created with DJGPP
- -------------------------------------------

To debug a program, you must first compile its source files with `-g'
switch:

        gcc -c -Wall -g mymain.c
        gcc -c -Wall -g mysub1.c
        gcc -c -Wall -g mysub2.c

and then link with `-g' as well:

        gcc -g -o myprog.exe mymain.o mysub1.o mysub2.o

(Note that with v2.01 of DJGPP, it is no longer necessary to compile
to a raw COFF output by omitting the `.exe' from the filename in order
to debug programs.  The new v2.01 debuggers are capable of reading an
executable as well as the raw COFF.  If you don't understand this,
don't worry about it.)

Then run your program under the debugger:

        fsdb myprog.exe
or
        gdb myprog.exe
or
        edebug32 myprog.exe

(You will have to get gdb416b.zip if you want to debug with GDB.)
FSDB has its help screen; press F1 to read it.  GDB comes with Info
docs (see below) which can be read with info.exe.  Edebug32 is a
seldom-used alternative debugger; type 'h' to get help.

- --------------------------------
Development environment (aka IDE)
- ---------------------------------

Currently, DJGPP doesn't come with an integrated environment of its
own.  You are free to choose any editor that can launch DOS programs
and catch their output, to act as an IDE.  Many people who work with
DJGPP use a DOS port of GNU Emacs (it's available from the same place
you got DJGPP) which can be compiled with DJGPP.  Emacs is a very
powerful editor (for example, it has a built-in Info reader, so you
can read DJGPP documentation without leaving the editor), but many
other free editors can serve as an IDE.  The only task that these
editors (including Emacs) cannot do is to run a debugger in a
full-screen session.

A DJGPP-specific IDE called RHIDE has recently been released and is
now available to all DJGPP users.  It features a Turbo C-style
interface, auto-indentation, color syntax highlighting, automatic
invocation of the DJGPP compiler, automatic Makefile generation,
and easy access to the DJGPP online documentation.  RHIDE also
incorporates integrated and/or standalone debugging using the same
functionality as the GNU Debugger (gdb).  Since RHIDE is brand
new, there are still revisions and bugfixes being made; visit
http://www.tu-chemnitz.de/~rho/rhide.html for the latest information
and updates.


- ------------------------
Misc information
- ------------------------

Compatibility with V2.00

If you are upgrading from version 2.00 of DJGPP to version 2.01, you
should completely reinstall all the packages you need to use.  Because
of the different methods used by V2.01 to handle long command lines
(and long filenames under Win95), mixing V2.00 and V2.01 programs can
cause very subtle and difficult to debug problems.  See the FAQ section
16.6 for more information.


Compatibility with V1.x

Existing binaries compiled under DJGPP V1.x can be used for
applications for which there is no v2.0 version.  V1 programs cannot
run V2 programs (but v2 programs *can* run v1 programs), so don't try,
say, using v1.x Make to run v2.0 compiler.


THE DISTRIBUTION


The 'b' zips include the binaries and on-line documentation.  At the
time of writing this file, the various packages are:

FAQ      A short file which points you to other documents you should
           read (including the full FAQ list).

v2/
unzip386 A free program to unzip the archive (like PKUNZIP)
djdev201 DJGPP V2 Development Kit and Runtime
djlsr201 DJGPP V2 Base Library Sources
djtst201 DJGPP V2 Test Programs
djcrx201 DJGPP V2 For Building a Cross-to-DOS Compiler
faq210b  The full FAQ list in various formats (Info, ASCII, HTML...)
faq210s  The Texinfo sources of the FAQ and tools to generate all the
          different formats of the FAQ
frfaq020 DJGPP FAQ en Francais

v2apps/
rhide11b Integrated Development Environment for V2
rhide11s Sources for RHIDE

v2gnu/
bnu27b   GNU binutils 2.7 for DJGPP V2
bnu27s   GNU binutils 2.7 sources
bsh1147b GNU bash 1.14.7 for DJGPP V2
bsh1147s GNU bash 1.14.7 sources
bsn124b  GNU bison 1.24 for DJGPP V2
bsn124s  GNU bison 1.24 sources
dif271b  GNU diffutils 2.7.1 for DJGPP V2
dif271s  GNU diffutils 2.7.1 sources
em1934b  GNU emacs 19.34 Binaries for DJGPP V2
em1934l? GNU emacs 19.34 Elisp sources (3 files)
em1934r? GNU emacs 19.34 Runtime support (3 files)
em1934s? GNU emacs 19.34 sources (3 files)
fil313b  GNU fileutils 3.13 for DJGPP V2
fil313s  GNU fileutils 3.13 sources
find41b  GNU findutils 4.1 for DJGPP V2
find41s  GNU findutils 4.1 sources
flx252b  GNU Flex 2.5.2 for DJGPP V2
flx252s  GNU Flex 2.5.2 sources
g770519b GNU Fortran77 0.5.19 for DJGPP V2
g770519s GNU Fortran77 0.5.19 sources
gcc2721b GNU GCC 2.7.2.1 for DJGPP V2
gcc2721s GNU GCC 2.7.2.1 sources
gdb416b  GNU Debugger 4.16 for DJGPP V2
gdb416s  GNU Debugger 4.16 sources
gdbm173b GDBM 1.7.3 binaries for DJGPP V2
gdbm173s GDBM 1.7.3 sources
gpc20b   GNU Pascal 2.0 binaries for DJGPP V2
gpc20s   GNU Pascal 2.0 sources
gpp2721b GNU G++ 2.7.2.1 for DJGPP V2 (no libs)
gpt112b  GNU Pascal with Turbo Pascal Extensions
grep20b  GNU grep 2.0 for DJGPP V2
grep20s  GNU grep 2.0 sources
gwk302b  GNU awk 3.0.2 for DJGPP V2
gwk302s  GNU awk 3.0.2 sources
gzp124b  GNU gzip 1.2.4 for DJGPP V2
gzp124s  GNU gzip 1.2.4 sources
isp3120b GNU ispell 3.1.20 for DJGPP V2
isp3120s GNU ispll 3.1.20 sources
lgp271b  GNU libg++ 2.7.1 for DJGPP V2
lgp271s  GNU libg++ 2.7.1 sources
lss321b  GNU less 321 binaries for DJGPP V2
lss321s  GNU less 321 sources
mak375b  GNU Make 3.75 for DJGPP V2
mak375s  GNU Make 3.75 sources
obc2721b GNU ObjC 2.7.2.1 for DJGPP V2
pat21b   GNU patch 2.1 for DJGPP V2
pat21s   GNU patch 2.1 sources
rcs5712b GNU rcs 5.7pl12 for DJGPP V2
rcs5712s GNU rcs 5.7pl12 sources
sed118b  GNU sed 1.18 for DJGPP V2
sed118s  GNU sed 1.18 sources
shl112b  GNU sh-utils 1.12 for DJGPP V2
shl112s  GNU sh-utils 1.12 sources
txi390b  GNU texinfo 3.9 for DJGPP V2
txi390s  GNU texinfo 3.7 sources
txt119b  GNU textutils 1.19 for DJGPP V2
txt119s  GNU textutils 1.19 sources

v2tk/
alleg21  Allegro 2.1 source - game library
bcc2grx  Borland GUI to GRX interface for DJGPP V2
bcserio  Bill Currie's Serial Comms Package
djgpptsr Example of writing TSRs with DJGPP
gccsjis  Patch to gcc to compile JIS src (beta)
grx20    GRX 2.0 Graphics Library for DJGPP V2
jkthpack JK's DOS Thread Package
jptui37d JPTUI Text User Interface
libkb100 Portable low-level keyboard library
lmb051b  JIS Multibyte library (beta)
lmb051s  JIS Multibyte library source (beta)
lw03b    JIS Wide-char library (beta)
lw03s    JIS Wide-char library source (beta)
mkkbd3   Keyboard Handler Examples
mttws121 Malcom Taylor's Windowing System
pdc22    Public-domain Curses library
rsxntdj1 RSX/NT for DJGPP
sw21_dj1 SWORD Windowing system, Binaries for DJGPP V1
sw21_dj2 SWORD Windowing system, Binaries for DJGPP V2
sw21_doc SWORD Windowing system, documentations
sw21_p1  SWORD Windowing system, Part 1
sw21_p2  SWORD Windowing system, Part 2
sw21_tc  SWORD Windowing system, Binaries for TurboC
tvisionb TurboVision libraries and headers
tvisions TurboVision Sources

v2misc/
csdpmi3b CWSDPMI, Charles Sandmann's free DPMI server binaries and docs
csdpmi3s CWSDPMI sources
infng100 Convert INFO to Norton Guides
mlp105b  ML's Executable File Packer Binaries
mlp105s  ML's Executable File Packer Sources
pmode11b PMODE stub for djgpp V2
pmode11s PMODE stub for djgpp V2
wmemu2b  WM's 387 emulator binaries for DJGPP V2
wmemu2s  WM's 387 emulator sources for DJGPP V2


- --- COPYRIGHT ---

DJGPP V2 is Copyright (C) 1995 by DJ Delorie.  Some parts of libc.a
are Copyright (C) Regents of the University of California at Berkeley.

GNU software (gcc, make, libg++, etc) is Copyright by the Free
Software Foundation.

DJGPP V2's copyright allows it to be used to produce commercial
applications.  However, if you include code or libraries that are not
part of djgpp (like gnu's libg++) then you must comply with their
copyrights.  See Chapter 19 of the FAQ for more details.


Enjoy!


DJ Delorie
dj AT delorie DOT com
http://www.delorie.com/
------- End of forwarded message -------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019