|
-
May 9th, 2010, 05:58 PM
#16
Re: Whats up with my dev c++?
STLFilt is well worth the few mins of hassle to get set up.
Get Microsoft Visual C++ Express here or CodeBlocks here.
Get STLFilt here to radically improve error messages when using the STL.
Get these two can't live without C++ libraries, BOOST here and Loki here.
Check your code with the Comeau Compiler and FlexeLint for standards compliance and some subtle errors.
Always use [code] code tags [/code] to make code legible and preserve indentation.
Do not ask for help writing destructive software such as viruses, gamehacks, keyloggers and the suchlike.
-
May 9th, 2010, 11:24 PM
#17
Re: Whats up with my dev c++?
 Originally Posted by Ajay Vijay
Learning the meaning of messages quickly is not the cup of tea for most of the beginners. Also, as you move with templates, inlining, complicated overloaded or inheritance related error messages - even moderate or experienced programmers get confused over what compiler is telling. My experience with template errors, as emitted by gcc, is like horror! Couldn't get where did the error started. Agreed that versions before VC8 wasn't that friendly with template related errors, they still were better than gcc's error messages as of now!
The key skill for template errors, on any compiler, is wading through the useless noise to find the helpful information. Usually it's right at the beginning and/or right at the end of a given error...and the line number is often the most useful part, as has been said. You should see some of the errors you can end up with while trying to use boost::variant.....two pages of output for a 1-character typo, at times. (I'm hoping that C++0x variadic templates will allow the library maintainers to provide a simpler implementation which doesn't spew such massive errors.)
 Originally Posted by monarch_dodra
Sometimes the message helps, but I can't remember the last time I really had to stop and look up a compiler error message because I didn't understand what was going on, or how to fix it.
I actually have come across a few that I've had to look up recently. I think one was about "undefined reference to vtable for Class", which basically amounted to something like "you forgot to give the destructor a definition".
Seriously, how hard would it be to add an expert system to an IDE which could intelligently suggest what might be the cause of a given error?
-
May 9th, 2010, 11:36 PM
#18
Re: Whats up with my dev c++?
I'm hoping that C++0x variadic templates will allow the library maintainers to provide a simpler implementation which doesn't spew such massive errors
I think that feature is concepts, and not variadic templates.
Seriously, how hard would it be to add an expert system to an IDE which could intelligently suggest what might be the cause of a given error?
I still argue that intelligent compiler should have error codes.
-
May 9th, 2010, 11:38 PM
#19
Re: Whats up with my dev c++?
 Originally Posted by Ajay Vijay
I think that feature is concepts, and not variadic templates.
In general yes, but if you'd seen the boost::variant errors I have you'd know what I was talking about. Massive types with like 20 template parameters, most of which are called "unused" or something.....
I still argue that intelligent compiler should have error codes.
Couldn't hurt, but a true expert system would go far enough beyond that as to make them redundant. It would have processing such as:
1) Function is an unresolved external symbol.
2) Is there a function with the same name defined?
3A) Yes -> There might be a parameter/qualifier mismatch between a function declaration on line N and the definition on line M?
3B) No -> Is there a function with a similar name defined?
3Ba) Yes -> There might be a typo in the function declaration on line N or the definition on line M?
etc.
Last edited by Lindley; May 9th, 2010 at 11:42 PM.
-
May 10th, 2010, 08:35 AM
#20
Re: Whats up with my dev c++?
About gcc not giving good error messages or error count: that is Dev-C++ not revealing them, not gcc failing to give them. Code::Blocks gives you more output. Also, You said you're working with GCC 3.2? O.o Use 4.2 if you are on Mac or 4.4 if you are on PC/Linux.
Why do you want an error code? GCC gives you an the error in plain english, as well as the exact line that the error occurs on.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|