Installing G++ or a c++ compiler?

Hi everyone!

I’ve migrated from my affinity for perl and started trying to write C++ programs. I have all the expertise of a doorknob, so hopefully you’ll bear with this australopithecine for a moment. :wink:

I started off with a very simple Hello World program, and tried to compile it with GCC. My result?

Test> gcc start.cpp -o start.o
gcc: error trying to exec ‘cc1plus’: execvp: No such file or directory

So I realized gcc was more in the league of C than C++. Beating my chest and grunting around like a caveman, I tried to search around for g++. It’s not installed and I accidentally offended the Geico cavemen. So I started using Yast. The problem is, I don’t really understand how to use yast other than to find things. I find gcc-c++, but every time I try to get it, it tries to draw from my dvd drive, in which I don’t have anything placed.

Bear with me, this is all while the Geico cavemen are now suing me.

So I started searching for g++ RPMs on google. Something along the lines of:

SuSE g++ RPM download

But I keep running into walls and either can’t find RPMs (am I looking in the wrong places?) or when I do find an RPM, it’s for gcc-c++ and when I do

rpm -ivh name_of_gcc-c++.rpm

it says it’s already already installed?

Any help? Would love your thoughts. Thank you so much. And for the curious: fortunately, I escape the lawsuit. Lance Ito decides the glove doesn’t fit.

Sounds like you need to remove the OpenSUSE repository that points to your DVD and add the appropriate OSS repository from the repositories page (they’re copied below for your convenience). The package name is g++.


Hey, thanks so much!

Since I am using SuSE Linux Enterprise 10, I wasn’t sure which one to go for. I guessed 11.

Looking at the directory, I’m also not sure what to do. I read through the readme files, which contain mostly EULA and legal information. I will keep reading and try to figure this out … should I download specific files and install them in specific places, or ?

Hey if you’re using SuSE Linux Enterprise then you should look for the repositories for SLES or SLED (which stand for SuSE Linux Enterprise Server (S) or Desktop (D).

Since I am using SuSE Linux Enterprise 10, I wasn’t sure which one to go for. I guessed 11.

SLE[SD] is based on SUSE 10.1


nevermind… should have finished reading all of it.

try running g++ instead of gcc.

gcc == c
g++ == c++