Writings Photos Code Contact Resume
Me, g++, C++ and the segfaults.

You are here

Submitted by msameer on Sun, 06/11/2005 - 3:22am

3 years ago, Alaa offered to teach me C++ to make a better mind out of my C overloaded mind.

Next day when I was practicing, I wrote my 1st C++ code and sure it had syntax errors, The result was a compiler crash.

These days I'm trying to implement something in C++, And yes, It had errors too. The result was also a crash

mohammed@uniball:~/projects/spell$ g++ -c morph.cc `pkg-config glibmm-2.4 --cflags`
In file included from morph.hh:4,
                 from morph.cc:6:
word.hh:5:18: error: glibmh: No such file or directory
word.hh:10: error: expected `)' before ‘,’ token
word.hh:13: error: ‘std::ustring’ has not been declared
word.hh:13: error: ‘std::ustring’ has not been declared
word.hh:14: error: ‘std::ustring’ has not been declared
word.hh:14: error: ‘std::ustring’ has not been declared
word.hh:14: error: ‘std::ustring’ has not been declared
word.hh:15: error: ‘ustring’ in namespace ‘std’ does not name a type
word.hh:16: error: ‘std::ustring’ has not been declared
word.hh:17: error: ‘ustring’ in namespace ‘std’ does not name a type
word.hh:18: error: ‘std::ustring’ has not been declared
word.hh:19: error: ‘ustring’ in namespace ‘std’ does not name a type
word.hh:20: error: ‘std::ustring’ has not been declared
word.hh:24: error: ‘ustring’ in namespace ‘std’ does not name a type
word.hh:25: error: ‘ustring’ in namespace ‘std’ does not name a type
word.hh:26: error: ‘ustring’ in namespace ‘std’ does not name a type
word.hh:32: error: invalid use of ‘::’
word.hh:34: error: ‘std::ustring’ has not been declared
word.hh:34: error: ‘std::ustring’ has not been declared
word.hh:35: error: ‘std::ustring’ has not been declared
word.hh:35: error: ‘std::ustring’ has not been declared
word.hh:35: error: ‘std::ustring’ has not been declared
g++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-4.0/README.Bugs>.

Why do I have the feeling that I should stick to C only ? ;-)

Comments

Submitted by Eman M (not verified) on Sun, 06/11/2005 - 6:52am

No, go on in C++, you will like it
I used to love coding with it, ayam ma konna b n code ba2ah :)

Submitted by msameer on Sun, 06/11/2005 - 7:06am

I LOVE C++!
I like the idea of fnction overloading, The memory management is a piece of cake, The OOP is sweet!

But, C++ doesn't like me, I still need to read "Thinking in C++", Maybe then we'll live together.

Hmmmm, Why don't you join me ? I can use another C++ mind in this FLOSS project!

Submitted by Youcef (not verified) on Sun, 06/11/2005 - 4:53pm

Damn, how can you manage to crash g++ twice in a row ?

I suggest you continue, you know the Murphy's law ;-) I'm curious to see if you can have some success in doing it a third time.

Submitted by msameer on Mon, 07/11/2005 - 6:10am

Well, This time can be considered one and a half ;-)

After the crash, I fixed the code then decided to submit a bug.

I tried to return the code to the crashing state but I failed to make it identical so this crash is slightly different than the original one ;-)

Add new comment

Subscribe to /  digg  bookmark