|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: EGCS...doesn't work...
it is not the code at all that is causing your headaches. It is the
compiler command that is wrong. You should try compiling using g++, if you
are running under linux. I am not sure of the cc equivalent. I had the
same problem when i was moving to C++ from C. I use both the gcc command as
well as the g++ command. cc is the C compiler as was gcc. Therefore I
venture to say that there is an equivalent to g++ on your system. You might
try to run a find on cc1plus and then make sure that path is located in your
path environment variable. But you may have the g++ command on your system.
If so, it should do the job for you.
Out of curiosity, what type of system and os are you running on?
Thanks and I hope this helps,
Jason
----- Original Message -----
From: Lionel Pinkhard <lionelpi@mweb.co.za>
To: <gameprogrammer@gameprogrammer.com>
Sent: Thursday, June 08, 2000 3:41 PM
Subject: Re: EGCS...doesn't work...
> I'm using the GNU C compiler, and here's the code (simple, but I'm only
> starting with C++, I usually code normal C):
>
> #include <iostream.h>
>
> void main() {
> cout << "hello world";
> };
>
> This is what I type to compile ($ resembles prompt):
>
> $ cc hw.cpp
> cc: installation problem, cannot exec 'cc1plus': No such file or
> directory.
>
> The following procedure with the same compiler, does however work (C, not
> C++):
>
> void main() { /* compiler test */
> int x, y;
> printf("Enter two numbers, seperated by colons (end with .):");
> scanf("%d:%d.", &x, &y);
> /* let's divide them :-) */
> printf("%d / %d = %d; %d %% %d = %d\n\r",
> x, y, x / y, x, y, x % y);
> exit(0);
> };
>
> This code I compiled by typing:
>
> $ cc compiler-test.c
> $
>
> It returned no output, meaning, obviously, that it compiled perfectly. I
> ran the binary file produced, output was:
>
> Enter two number, seperated by colons (end with .): 5, 3
> 5 / 3 = 1; 5 % 3 = 2;
> $
>
> Ok, I hope this is enough information.
>
> Kind regards,
>
> Lionel Pinkhard
>
> On Thu, 8 Jun 2000, Jason Brunson wrote:
>
> > If you don;t mind my asking, what compiler are you using and what does
the
> > source code look like. Also, forgive me, but what is the error that you
are
> > receiving? I am sorry that I had not followed this post better so that
I
> > would not have to ask these questions.
> >
> > Thanks,
> > Jason
> >
> > ----- Original Message -----
> > From: Lionel Pinkhard <lionelpi@mweb.co.za>
> > To: <gameprogrammer@gameprogrammer.com>
> > Sent: Thursday, June 08, 2000 1:41 PM
> > Subject: EGCS...doesn't work...
> >
> >
> > > Hi,
> > >
> > > I'm sorry, but it looks like I already have egcs (and egcs-c++)
installed.
> > > I tried to install them and it told me it's already installed, any
other
> > > ideas?
> > >
> > > Kind regards,
> > >
> > > Lionel Pinkhard
> > >
> > > =================================================================
> > > The GameProgrammer.Com mailing list is for the open discussion
> > > of any topic related to the art, science, and business of
> > > programming games. This list is especially tolerant of beginners.
> > > We were all beginners once
> > >
> > > To SUBSCRIBE or UNSUBSCRIBE please visit:
> > > http://gameprogrammer.com/mailinglist.html
> >
> > =================================================================
> > The GameProgrammer.Com mailing list is for the open discussion
> > of any topic related to the art, science, and business of
> > programming games. This list is especially tolerant of beginners.
> > We were all beginners once
> >
> > To SUBSCRIBE or UNSUBSCRIBE please visit:
> > http://gameprogrammer.com/mailinglist.html
> >
>
> =================================================================
> The GameProgrammer.Com mailing list is for the open discussion
> of any topic related to the art, science, and business of
> programming games. This list is especially tolerant of beginners.
> We were all beginners once
>
> To SUBSCRIBE or UNSUBSCRIBE please visit:
> http://gameprogrammer.com/mailinglist.html
=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once
To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html
|
|