CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    Join Date
    Nov 2008
    Location
    England
    Posts
    748

    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.

  2. #17
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: Whats up with my dev c++?

    Quote Originally Posted by Ajay Vijay View Post
    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.)

    Quote Originally Posted by monarch_dodra View Post
    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?

  3. #18
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871

    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.
    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

  4. #19
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: Whats up with my dev c++?

    Quote Originally Posted by Ajay Vijay View Post
    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.

  5. #20
    Join Date
    Jan 2009
    Posts
    1,689

    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.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured