www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/02/04:53:42

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: DJGPP: Please help!
Date: Sun, 02 Feb 1997 03:52:08 -0800
Organization: Two pounds of chaos and a pinch of salt
Lines: 59
Message-ID: <32F47FE8.D0F@cs.com>
References: <32F3AE8F DOT 2AAC AT redrose DOT net>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp107.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Justin Risser wrote:
> 
> Hello.  I have written simple C++ files at school on their system.  I
> downloaded the whole DJGPP thing and put it in all the directories and
> stuff.  I was wondering if anyone knows how to compile the source and
> stuff.  I am just talking about "Hello World" programs here nothing
> fancy, but I just need a way to get started.  Anyone have any simple
> source examples they could share?  Thanks.

The 'readme.1st' file contains examples of using the 'gcc' compiler to
compile programs.  The most basic gcc command line looks like this:

> gcc program.c

This will compile 'program.c' and produce 'a.out' and 'a.exe' as
output.  If you want to tell gcc what file to output, use the '-o'
option like so:

> gcc -o program.exe program.c

More options can control such desirable features as warnings,
optimizations, and debugging information.  In fact, the following
command line should be the standard one to use for just about every
program you write unless it has special needs:

> gcc -Wall -O -g -o program.exe program.c

'-Wall' turns on a lot of valuable compiler warnings and error messages
that can substantially aid beginning (and advanced) programmers.  '-O'
turns on optimizations, making your code smaller and faster and allowing
detection of certain additional bugs.  '-g' adds debugging information
to your compiled program, allowing debuggers such as 'gdb' to find the
cause of problems.

If you have any problems compiling, please consult the DJGPP Frequently
Asked Questions list (v2/faq210b.zip from SimTel).  It contains a wealth
of useful getting started information in the first 8 chapters.  Pay
particular attention to chapter 6 and the first several sections of
chapter 8 for the most common installation problems encountered by
beginning users.  The FAQ comes in text, HTML, and Info formats; the
latter suitable for reading by the free Info browser that is part of the
DJGPP distribution (v2/txi390b.zip).  All the DJGPP documentation can be
read using Info.

Finally, there is a newly-developed IDE for DJGPP called RHIDE.  It
closely resembles the interface of Turbo C, and is an extremely
well-written program.  You can download it from SimTel as
<v2apps/rhide11b.zip>, but you should also vist Robert Hoehne's web page
at <http://www.tu-chemnitz.de/~rho/rhide.html> for the latest updates.

Good luck!  If you have more questions, feel free to post again!

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I      |   mailto:fighteer AT cs DOT com   |
| God's final message to His Creation: | http://www.cs.com/fighteer |
| "We apologize for the inconvenience."| Fight against proprietary  |
|                      - Douglas Adams | software - support the FSF!|
---------------------------------------------------------------------

- Raw text -


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