Skip to Content.
Sympa Menu

baslinux - [BL] compiling C++ with gcc

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: Sindi Keesan <keesan AT iamjlamb.com>
  • To: baslinux AT lists.ibiblio.org
  • Subject: [BL] compiling C++ with gcc
  • Date: Fri, 26 Dec 2003 18:27:56 -0500 (EST)

We installed the packages needed to compile linux programs with BL2 and
tried to compile a small program from the C++ book using gcc.

The compiler cannot find any of the *.h files in the g++-2 subdirectory
unless you compile with g++ instead of gcc. It came with one of the
packages that we installed.

You also need to rewrite most of the C++ code from what is given in the
text book Programming with C++ because apparently g++ and the compiler
used in the book (for Windows?) speak rather different dialects. Still
working on trying to write a program that will print out one short
sentence.

So gcc is apparently not capable of compiling C++ programs but g++
is if you write them properly for this specific compiler. For instance,
you have to add include <stdio.h>.

Sindi and Jim





Archive powered by MHonArc 2.6.24.

Top of Page