delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/14/03:49:35

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Can't get much newbie-er then this...
Date: Thu, 12 Jun 1997 20:23:42 +0000
Organization: Two pounds of chaos and a pinch of salt
Lines: 47
Message-ID: <33A05ACE.3DD6@cs.com>
References: <01bc7737$d1776260$b63363c3 AT dell-p133c>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp103.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Reinier Zwitserloot wrote:
> 
> it, but I can't find the compiler. Heh, really lost I suppose. (It's
> v2.10). I did find the assembler (DJASM), but, well, didnt find the C
> compiler. any help?

The program 'gcc.exe', which stands for GNU C Compiler, is the main
driver for compilation of most of your programs.  Just pass the
appropriate parameters to it and it will invoke all subprograms
necessary to produce the desired output.  The 'v2/readme.1st' file
describes basic gcc command lines, so I won't go over them in detail
here.  But your standard command line for compiling most C programs will
look like this:

  gcc -Wall -O -g -o prog.exe prog.c

Going backwards... 'prog.c' is the name of the file to compile.  '-o
prog.exe' tells gcc what file to produce as output; specifying the .exe
extension tells it to produce a complete executable.  '-g' instructs the
compiler to include full debugging information in the executable (very
useful).  '-O' turns on basic optimizations to speed up your code and
reduce its size.  Finally, '-Wall' turns on a variety of warning
messages that catch a great deal of common mistakes.  '-Wall' is your
friend; get used to using it in every command line.

You may also want to check out RHIDE; it's a full-fledged IDE for DJGPP
that resembles Borland's Turbo C interface, and it spares you the
trouble of typing out those command lines every time (amongst other
things).

Before you go much further, PLEASE download and read the DJGPP
Frequently Asked Questions list (v2/faq210b.zip from SimTel).  It
answers the most common beginner questions about DJGPP, including why
DJGPP is different from other DOS compilers, and why these differences
are Good Things (tm).  ;)  It also tells you how to resolve a multitude
of configuration problems, and answers the most common user complaints
as well.

Good luck!

-- 
---------------------------------------------------------------------
|      John M. Aldrich       | "Waking a person unnecessarily       |
|       aka Fighteer I       | should not be considered a capital   |
|   mailto:fighteer AT cs DOT com   | crime.  For a first offense, that    |
| http://www.cs.com/fighteer | is."            - Lazarus Long       |
---------------------------------------------------------------------

- Raw text -


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