Solved

gcc error.. no cpp?

Posted on 1998-11-07
4
468 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
ok, got it working now.
thanks.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now