|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: Unix Compilers
since when does the GNU C++ compiler not accept .cpp extensions?
--Bill
P.S. are c++ and g++ actually the same program? on our unix machines at
school they are actually two separate executables. it would seem like one
would be a symlink to the other if they were actually invoking the same
compiler.
>Well, this one's different, you can either use .cc, .cxx or .C (must be
>capital!). This is just Unix's way of doing things! :-) And don't use
>.hpp for header files (some people do), use only .h! For assembly files
>use .s or .S if you need to preprocess it. For preprocessed C code use .i
>and for C++ it's .ii. Better get used to these names, it doesn't take
>anything else! The output file will be (by default) a.out and not the name
>of the source file.
>
>Ciao,
>
>Lionel
>
>BTW Compile using 'c++ filename.cc', or 'c++ filename.C'. There's another
>command, I think g++ or something, but this one works.
>
>On Fri, 16 Jun 2000, Matthew J Burke wrote:
>
>> Date: Fri, 16 Jun 2000 15:31:50 -0400 (EDT)
>> From: Matthew J Burke <mburke6@osf1.gmu.edu>
>> Reply-To: gameprogrammer@gameprogrammer.com
>> To: Game Programmer Mailing <gameprogrammer@gameprogrammer.com>
>> Subject: Re: Unix Compilers
>>
>> Is caring about the extension something most compilers do, or is it just
>> GNU? I just use commercial compilers, and have never encountered a
>> problem with just using .cpp, .CPP, or no extension (if I'm lazy and the
>> prog is small).
>>
>> -Matt
>>
>>
>> On Fri, 16 Jun 2000, Lionel Pinkhard wrote:
>>
>> > Ahhh, that's so easy! Don't call it hello.cpp! Call it hello.cc or
>> > hello.C. :-) Just the wrong extension, that's all, nothing to worry
about!
>> >
>> > - Lionel
>> >
>> > On Fri, 16 Jun 2000, Mike Main wrote:
>> >
>> > > Date: Fri, 16 Jun 2000 12:08:19 -0700
>> > > From: Mike Main <anime6@earthlink.net>
>> > > Reply-To: gameprogrammer-owner.at.gameprogrammer.com@fairesuivre.fr,
>> > > gameprogrammer@gameprogrammer.com
>> > > To: Game Programmer Mailing <gameprogrammer@gameprogrammer.com>
>> > > Subject: Unix Compilers
>> > >
>> > > It's C++ code, and I'm trying to use GNU C++ (also known as egcs-
c++). The
>> > > filename of the program is hello.cpp . The code looks like this:
>> > >
>> > > #include <iostream.h>
>> > >
>> > > int main()
>> > > {
>> > > cout<<"Hello World"<<endl;
>> > > return 0;
>> > > }
>> > >
>> > > It keeps on telling me that something can't be found. Something to
do with
>> > > the header file.
>> > >
>> > > Mike Main
>> > >
>> > > > > Hi,
>> > > > >
>> > > > > Don't feel bad about it, something like this happens to all Unix
users,
>> > > so
>> > > > > get used to it! :-) I haven't had any trouble using my compilers,
but
>> > > tell
>> > > > > me first: Is it C or C++ code? And what do the filenames look
like? How
>> > > > > are you compiling? It doesn't sound too tough and I will gladly
help
>> > > you.
>> > > > >
>> > > > > Ciao,
>> > > > >
>> > > > > Lionel
>> > > > >
>> > > > > On Thu, 15 Jun 2000, J C Lawrence wrote:
>> > > > >
>> > > > > > Date: Thu, 15 Jun 2000 21:39:14 -0700
>> > > > > > From: J C Lawrence <claw@kanga.nu>
>> > > > > > Reply-To: gameprogrammer@gameprogrammer.com
>> > > > > > To: gameprogrammer@gameprogrammer.com
>> > > > > > Subject: Re: Unix Compilers
>> > > > > >
>> > > > > > On Thu, 15 Jun 2000 23:56:34 -0700
>> > > > > > Mike Main <anime6@earthlink.net> wrote:
>> > > > > >
>> > > > > > > I have a problem. I'm a DOS user going over to Unix. I've
>> > > > > > > learned how to navigate the system, manipulate and create
files.
>> > > > > > > But I'm having trouble getting my GNU Compiler to work. I
run cc,
>> > > > > > > c++, g++, and bc on a simple "Hello World" program. I feel
kind
>> > > > > > > of degraded, because I'm a pro DOS programmer, but I don't
>> > > > > > > understand why the compiler isn't working. It keeps saying
>> > > > > > > something about iolib.h or something. Can someone help me?
>> > > > > >
>> > > > > > We're going to need an exact copy of your sources, the exact
command
>> > > > > > line you are invoking GCC with, the exact error message, and
the
>> > > > > > version of GCC, and libC that you have installed.
>> > > > > >
>> > > > > > --
>> > > > > > J C Lawrence Home:
claw@kanga.nu
>> > > > > > ----------(*) Other:
coder@kanga.nu
>> > > > > > --=| A man is as sane as he is dangerous to his environment
|=--
>> > > > > >
=================================================================
>> > > > > > 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 moon could not continue shining if it had to pay attention
to all
>> > > the
>> > > > dogs barking at it." - Anonymous
>> > > > >
>> > > > > =================================================================
>> > > > > 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 moon could not continue shining if it had to pay attention to all
the dogs barking at it." - Anonymous
>> >
>> > =================================================================
>> > 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 moon could not continue shining if it had to pay attention to all the
dogs barking at it." - Anonymous
>
>=================================================================
>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
|
|