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
Solved

gcc error.. no cpp?

Posted on 1998-11-07
4
548 Views
Last Modified: 2010-04-20
i get this when i try to run gcc:
gcc: installation problem, cannot exec `cpp': No such file or directory  
it was working fine before.. what do i need to do?
thanks..
0
Comment
Question by:Vickio
  • 2
  • 2
4 Comments
 

Accepted Solution

by:
jji earned 70 total points
ID: 1638450
from "man gcc":
.
LIBDIR/cpp         preprocessor
.
LIBDIR is usually /usr/local/lib/machine/version.


So it seems like you have somehow lost your copy of cpp. Try
`locate cpp|grep lib`, if you find it somewhere put the path
to your /etc/ld.so.conf and run `ldconfig -v`.
(Or you could re-install gcc.....)
0
 

Author Comment

by:Vickio
ID: 1638451
it didnt find cpp, so i reinstalled gcc (or tried to at least) and now it will compile a c file  no problem but when i tried a simple c++ file (that just printed some text) i got this:

In file included from /usr/include/g++/iostream.h:31,
                 from test.cc:1:
/usr/include/g++/streambuf.h:403: warning: invalid type `void *' for default argument to `ios *'
In file included from test.cc:1:
/usr/include/g++/iostream.h:50: warning: invalid type `void *' for default argument to `ostream *'
/usr/include/g++/iostream.h:123: warning: invalid type `void *' for default argument to `ostream *'
/usr/include/g++/iostream.h:230: warning: invalid type `void *' for default argument to `ostream *'
/tmp/cca011651.o: In function `main':
/tmp/cca011651.o(.text+0x9): undefined reference to `cout'
/tmp/cca011651.o(.text+0xe): undefined reference to `ostream::operator<<(char const *)'  

so now what?
0
 

Expert Comment

by:jji
ID: 1638452
It seems like you don´t have libraries around or you didn´t
include them properly....
Did you compile it with g++? (g++ test.cc) If not it sure
will do something like that.
Try with g++ and if got no luck throw the code here.
0
 

Author Comment

by:Vickio
ID: 1638453
ok, got it working now.
thanks.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ifconfig 4 69
Migrating php-mysql-jquery application to Microsoft Azure Cloud 7 38
Impact of disabling SMB v1 on Mac and Linux clients 4 533
linux SFTP 8 60
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

791 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