Problems with g++, probably really simple.

Ingo Krabbe ikrabbe@earthling.net
Mon Feb 5 02:04:00 GMT 2001


On Monday,  5. February 2001 01:09, Matthew Prowse wrote:
> I'm running SuSE 6.3 and installed gcc, libgcc, libgpp, gpp and docs.
> gcc hello.c - worked fine.
> g++ hello.cpp - couldn't find the files in /usr/include/g++ and then
> gave...
>
> majp@obsidian:~/cpp > g++ -I /usr/include/g++ hello.cpp
> In file included from /usr/include/g++/iostream.h:31,
> from /usr/include/g++/iostream:6,
> from hello.cpp:1:
> /usr/include/g++/streambuf.h:403: invalid type `void *' for default
> argument to `ios *'
> In file included from /usr/include/g++/iostream:6,
> from hello.cpp:1:
> /usr/include/g++/iostream.h:50: invalid type `void *' for default argument
> to `ostream *' /usr/include/g++/iostream.h:123: invalid type `void *' for
> default argument to `ostream *' /usr/include/g++/iostream.h:231: invalid
> type `void *' for default argument to `ostream *' majp@obsidian:~/cpp >
>
> I know that it is going to be something obvious, but I'm new and my eyes
> hurt I've been trying to find the answer for so long. Help would be much
> appreciated.
>
> Matthew Prowse

You may need to install some includes. It may be that suse has a split 
package for include file. Look for it.

Normally you don't need to specify an include path for iostreams, etc, but it 
shouldn't be a problem to do so. try
	g++ -v hello.cpp
to lookup exactly where g++ looks for include files. On some systems the 
correct include path is /usr/include/g++-2 or "g++-v2" or something similar. 
It looks like the files in /usr/include/g++ is broken.

CU INGO


More information about the Gcc-help mailing list