| delorie.com/archives/browse.cgi | search |
| From: | "leila" <gcceducate AT tutorialwizard DOT net> |
| To: | djgpp AT delorie DOT com |
| Subject: | Re: newbie here having trouble saying hello |
| X-Mailer: | NeoMail 1.25 |
| X-IPAddress: | 68.38.190.191 |
| MIME-Version: | 1.0 |
| Message-Id: | <E19T7cO-00040f-00@thunder8.cwihosting.com> |
| Date: | Thu, 19 Jun 2003 17:10:56 -0500 |
| X-AntiAbuse: | This header was added to track abuse, please include it with any abuse report |
| X-AntiAbuse: | Primary Hostname - thunder8.cwihosting.com |
| X-AntiAbuse: | Original Domain - delorie.com |
| X-AntiAbuse: | Originator/Caller UID/GID - [512 529] / [512 529] |
| X-AntiAbuse: | Sender Address Domain - thunder8.cwihosting.com |
| Reply-To: | djgpp AT delorie DOT com |
You must add djgpp\bin and djgpp.env to your path. Then compile and
link your C++ source `hello.cc' into `hello.exe' like this
gpp -o hello.exe hello.cc
for C you can use
gcc -o hello.exe hello.c
> Hi.
> Ok. I installed DJGPP 3.2.1 and rhide15b on an xp system and I'm
having trouble compiling a
> simple c++ "hello world" program. Heres the program.
> --------
> #include <iostream.h>
> main()
> {
> cout << "hello World!";
> return 0;
> }
> ---------
> I am able to run hello.exe after I enter the following commands at
the dos prompt.
> >gcc -c -Wall hello.cc
> >gxx -o hello.exe hello.o
> I get these warnings after the first command:
> ------------
> In file included from c:/djgpp/lang/cxx/3.21/backward/iostream.h:31,
> from hello2.cc:1:
> c:/djgpp/lang/cxx/3.21/backward/backward_warning.h:32:2: warning:
#warning This
> file includes at least one deprecated or antiquated header. Please
consider usin
> g one of the 32 headers found in section 17.4.1.2 of the C++
standard. Examples
> include substituting the <X> header for the <X.h> header for C++
includes, or <s
> stream> instead of the deprecated header <strstream.h>. To disable
this warning
> use -Wno-deprecated.
> hello.cc:4: warning: ISO C++ forbids declaration of `main' with no
type
> -------
> I understand the last warning about 'main', but not the first.
Anyway the program runs.
> Now when I try it in a new project (or just the file) in rhide I get
a similar message but with errors.
> -------
>
executing:
¦
> gcc -g -c hello/hello2.cc -o hello2.o
> -------
> Compiling:
hello.cc ?
> :/djgpp/lang/cxx/3.21/backward/iostream.h(31) In file included from
c:/djgpp/lang/cxx/3.21
> /backward/iostream.h:31
> hello/hello.cc(1) from
hello/hello2.cc:1: ¦
> c:/djgpp/lang/cxx/3.21/backward/backward_warning.h(32) Error: 2:
warning: #warning:
> This file includes at least one deprecated or antiquated header....
(etc)
> There were some
errors
> ---------
> I cant get it to compile. The C version compiles and runs fine. Any
help will be
> appreciated. I also cant get the help system in rhide to work. I
could also use
> some links to sites for newbies on using djgpp and rhide (besides
their websites...i'm
> kinda new and slow).
> Thanks.
>
>
>
>
>
--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |