views:

54

answers:

2

hey, i am trying to compile a c++ program in Linux, using the command in the shell g++ -Wall *.cpp -o prog

and for some reason it keeps on giving me a weird error:

g++: Internal error: Bus error (program cc1plus) Please submit a full bug report. See for instructions.

i searched the net for this bus error, and it says that it has to do with something about accessing illegal memory.

can someone maybe clarify things a bit more for me

thanx

Betty

+3  A: 

This error message is telling you that there's a bug in the g++ compiler itself.

Try to narrow it down by removing bits and pieces of your source file until the problem goes away. You're not trying to fix your program, you're just trying to find the part that is breaking the compiler. Once you've found it, you can either give a better bug description or you can change your code to work around it.

Or just download the latest version of the g++ compiler and hope that it's already fixed.

Mark Ransom
+2  A: 

Your problem is not in your code, is the compiler (g++) that is crashing and producing that Bus Error, it's possible you have an outdated version of such compiler and need to update, or you're lucky and found a real bug in g++.

I would try compiling each source file separately, to check what part of the source code triggers the error.

Matias Valdenegro