delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/17/23:00:35

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: newbie
Date: Fri, 17 Jan 1997 18:44:19 -0800
Organization: Two pounds of chaos and a pinch of salt
Lines: 96
Message-ID: <32E03903.23E5@cs.com>
References: <32DF47CA DOT C37 AT nwu DOT edu>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp101.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

j-schug AT nwu DOT edu wrote:
> 
> Hello. I am definately a new user - sick of just cruising around the
> web. I am trying to teach myself c but I am having a hard time setting
> up the compiler-lets face it , I barely understand what it is. I've
> downloaded it and unzipped it and now I'm stuck. If anyone out there has
> any info or time I would really appreciate it. My e-mail is
> j-schug AT nwu DOT edu. thanks.

There are several questions we have to ask in such situations, to help
determine where exactly you were when you had problems.  :)

First, the file 'v2/readme.1st' in the SimTel djgpp mirror explains in
detail the steps needed to choose packages, install them, and set them
up.  Try following the instructions there explicitly, and please tell us
_specifically_ what parts you don't understand, so we can make them
clearer.

Now, let's start.  What files did you download?  The bare minimum you
need to start compiling C programs are:

  v2/djdev201.zip
  v2gnu/bnu27b.zip
  v2gnu/gcc2721b.zip

You will probably need or want some additional packages:

If you run in DOS, you must have a DPMI host.  A free host can be found
in 'v2misc/csdpmi3b.zip'.  Once installed, it will automatically be used
by djgpp programs if no other DPMI is available.  If you see the message
"Load error:  No DPMI" when you try to run djgpp programs, then you need
cwsdpmi.

To read the online documentation, you will need the GNU Info browser
from 'v2gnu/txi390b.zip'.  Type "info" to start using the browser.  An
online tutorial is available by pressing 'h'.

The DJGPP Frequently Asked Questions list, found in 'v2/faq202b.zip',
contains an excellent array of tips for beginning and advanced users
alike.  It comes in info, text, and HTML formats.

RHIDE is an excellent IDE similar to Borland's Turbo C IDE.  You can get
it from 'v2apps/rhide10b.zip'.  Visit Robert Hoehne's web page
(http://www.tu-chemnitz.de/~rho/rhide.html) for the latest updates.

Get 'v2gnu/gdb416b.zip' for the most powerful source-level debugger
available.

Get 'v2gnu/mak375b.zip' for the GNU Make utility, which lets you compile
large projects with simple commands.

GNU Emacs (v2gnu/em1934b.zip) is an extremely powerful programmer's
editor.  It's not as easy to learn as RHIDE, but contains a vast array
of useful features and is completely customizable.

Okay, now that you have the packages you need, you must have installed
them correctly.  Did you remember to preserve the directory structure
when you unzipped them?  Hint:  use the '-d' switch to pkunzip.

Next, you MUST make two changes to your system environment before djgpp
programs will work.  First, you must add the djgpp BIN directory to the
PATH in your 'autoexec.bat' file.  If you installed djgpp in the
standard place, this would look like the following:

  PATH=C:\DOS;C:\WINDOWS;C:\MOUSE;C:\DJGPP\BIN

The second change is to create an environment variable called "DJGPP"
that indicates the location of the 'djgpp.env' file.  If you installed
djgpp in the standard place, then add the following line to your
'autoexec.bat':

  SET DJGPP=C:\DJGPP\DJGPP.ENV

That's it!  If you've done these things, then try creating a program and
compiling it.  To compile, use the 'gcc' command, as follows:

  gcc -o myprog.exe myprog.c

This causes gcc to compile 'myprog.c', and produce 'myprog.exe' as
output.

Consult 'readme.1st' and the FAQ for more examples and instructions.

Hope this helps!

-- 
John M. Aldrich <fighteer AT cs DOT com>                      

* Anything that happens, happens.
* Anything that, in happening, causes something else to happen,
  causes something else to happen.
* Anything that, in happening, causes itself to happen again, happens
  again.
* It doesn't necessarily do it in chronological order, though.
 
                                       --- Douglas Adams

- Raw text -


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