Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Can't use C++....

Posted on 1998-09-29
3
Medium Priority
?
209 Views
Last Modified: 2013-12-06
I am running Red Hat 5.1. I wrote some code in C++ but when i went to compile it, it said it couldn't find the header files. I checked to see if i had installed them and I did. But the header files are nowhere to be found. Also, when I ran gcc it said it couldnt fing cc1plus. That is also supposed to beinstalled but again its nowhere to be found. any ideas?

0
Comment
Question by:GreatOne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Expert Comment

by:mlev
ID: 1638173
All header files or just C++ header files?
Did you compile with g++ rather than gcc?
Try "rpm -V glibc-devel libstdc++-devel gcc egcs-c++"
0
 

Author Comment

by:GreatOne
ID: 1638174
Just the C++ header files are missing. I was able to compile it with g++ but I like gcc better. And I typed in that rpm command line. And nothing happened. I tried unintsalling and reinstalling but that did not work either. any more ideas?


0
 
LVL 2

Accepted Solution

by:
mlev earned 60 total points
ID: 1638175
Well, everything is okay then.
Disappointing as it may seem, while you may like gcc better,
g++ is the command to compile C++ programs with. The difference
is in flags. For example, g++ runs the compiler stage with -I/usr/include/g++ (that's where your C++ headers are),
and the linker stage with -lstdc++.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question