Mail Archives: djgpp/1997/08/07/23:11:19
> 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
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
Hope this helps
- Raw text -