delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/07/23:11:19

From: Brett Leslie Porter <bporter AT rabble DOT uow DOT edu DOT au>
Message-Id: <199708080310.NAA21404@rabble.uow.edu.au>
Subject: Re: Help for newbie.
To: Markralph AT btinternet DOT com
Date: Fri, 8 Aug 1997 13:10:10 +1000 (EST)
Cc: djgpp AT delorie DOT com (DJGPP)
In-Reply-To: <5s4ru9$bge@neon.btinternet.com> from Mark Ralph at "Aug 4, 97 03:19:37 pm"
MIME-Version: 1.0

> HI,
> 
> I just downloaded djgpp to practise some c++ but I can't
> get the simplest program to work.
> 
> I must be doing some thing very stupid so please help me s hese are the 
> hardesr things to see
> 
You need to compile like this:

(assuming the files are file1, file2, etc. )

gcc -o file1.o -c file1.cpp
gcc -o file2.o -c file2.cpp
...
finally:
gcc -o runme.exe file1.o file2.o -liostr

The -liostr is what you were missing... you weren't linking the iostreams
library, so it couldn't find cout etc.

I'm not exactly sure all this will work as I don't use command line often,
but it is the -l switch that is important.

To make it easier I suggest you download RHIDE v1.3 from the DJGPP homepage
and use it's project manager to compile programes. It is a very small
program itself, but has many features. Make sure if you do get it that you
go to the RHIDE homepage and get the patch so that it knows what to do with
.cpp files.

Hope this helps

Brett Porter

- Raw text -


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