Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: g++

Author: Pat King

Date: 13:26:49 05/26/04

Go up one level in this thread


On May 25, 2004 at 08:25:16, Christophe Drieu wrote:

>On May 25, 2004 at 08:19:44, Daniel Clausen wrote:
>
>>On May 25, 2004 at 08:05:29, Christophe Drieu wrote:
>>
>>>Hi, i want to rewrite my engine in C++, and my question is: Is g++ as good
>>>compiler as gcc or do i have to choose an other one ?
>>
>>g++ IS the C++ compiler of the GNU compiler. gcc is used for C-code, g++ for
>>C++.
>>
>>Sargon
>
>I made tried different compiler with my T.rex engine and gcc give me the best
>result. So i want to know if g++ will be the better too.
>
>Regards

To be perfectly clear - g++ and gcc are both part of the Gnu Compiler Collection
(referred to as gcc, hence the confusion). Calling g++ is just the same as
calling gcc, except for the libraries it automatically searches. Given the right
command line switches, g++ acts just like gcc, and gcc acts just like g++.

If you intend simply to recompile T.rex, then g++ will cause some headaches
getting the switches right, and in the end won't result in any improvement.

If you intend to add c++ code to T.rex, then it would be reasonable (IMHO) to
rename all your .c files .cpp, start using g++, fix what are hopefully only a
few errors, and then start adding the new c++ code.

Best of luck

Pat King



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.