# How to get rid of the annoying long STL warnings and errors?

This topic is 2995 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Yeah, how to get rid of warnings and errors? Easy: Fix them. But sometimes there are so much of them that I don't even find the first error in the compiler output.
The reason: When some bad thing happens my whole compiler output window is full of that stuff:

1>SceneManager.cpp(133): error C2678: binary '!=' : no operator found which takes a left-hand operand of type 'std::_Vector_iterator<_Myvec>' (or there is no acceptable conversion)1>          with1>          [1>              _Myvec=std::_Vector_val<BasicBlock *,std::allocator<BasicBlock *>>1>          ]1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\guiddef.h(197): could be 'int operator !=(const GUID &,const GUID &)'1>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector(206): or       'bool std::_Vector_const_iterator<_Myvec>::operator !=(const std::_Vector_const_iterator<_Myvec> &) const'1>          with1>          [1>              _Myvec=std::_Vector_val<BasicBlock *,std::allocator<BasicBlock *>>1>          ]1>          while trying to match the argument list '(std::_Vector_iterator<_Myvec>, std::_List_iterator<_Mylist>)'1>          with1>          [1>              _Myvec=std::_Vector_val<BasicBlock *,std::allocator<BasicBlock *>>1>          ]1>          and1>          [1>              _Mylist=std::_List_val<BasicBlock *,std::allocator<BasicBlock *>>1>          ]

(This is one error!)
Is there something around that helps me to get rid of all this junk? The first line would be enough for me [sad]

##### Share on other sites
Part of life when working with templates, I'm afraid...

Although for very simple situations the first line is sometimes enough, it can very often take all of the details provided to figure out exactly what is going wrong with nontrivial template code - and even then the errors don't always give enough hints.

##### Share on other sites
Well, rather that look at the Output Window for your errors, you could look at the Error List Window instead. If it's not open for you you can go to View->Error List or use Ctrl+\, E.

##### Share on other sites
@SiCrane: That is pretty cool [smile] But unfortunately everytime I press the compile button the window closes again. And this is annoying, too. Is there a workaround for this?

##### Share on other sites
It shouldn't actually close, what should be happening is that the output window is given focus. If the two windows are in the same tab set then you can just click the error list tab. If they aren't in the same tab set and the error list is visible before you do a build then the error list window should still be showing after the build.

##### Share on other sites
Here's a tool that's supposed to clean up messy STL error messages. STLFilt. I haven't tried it, but it might be useful.

##### Share on other sites
Quote:
 Original post by theOcelotHere's a tool that's supposed to clean up messy STL error messages. STLFilt. I haven't tried it, but it might be useful.

Sorry for this off topic post, but I've looked at the website; it looks like a great tool I might want to use. But the website is very bad. I find the navigation difficult. It explains what it does, but I cannot see any examples! Examples are so important! How do I know that I want this if I don't see what it does. There is this page: http://web.archive.org/web/20041012175848/www.cuj.com/documents/s=8024/cuj0107zolman/ but the links to the listings / figures are blank.
It annoys me when a potentially good tool is so badly represented.

Excuses for this off topic rant.

EDIT: Note how the link uses archive.org! The original site, which redirects to drdobbs.com, is not found. This is abysmal.

##### Share on other sites
I think you got fixated on the word "example" without giving the page a real look. Try looking for the word "demo" instead.

##### Share on other sites
Quote:
 Original post by SiCraneI think you got fixated on the word "example" without giving the page a real look. Try looking for the word "demo" instead.

You are right. Still didn't find it really quick though, but it was indeed in the compiler support listing: http://www.bdsoft.com/dist/gcc-demo.txt. I still stand that the website could much be improved, but who am I to decide over that.

This tool really does, looking at the demo, improve the errors. Which is very welcome, though after years I got used to lengthy error messages...

1. 1
2. 2
Rutin
22
3. 3
4. 4
5. 5
frob
12

• 9
• 17
• 9
• 31
• 16
• ### Forum Statistics

• Total Topics
632617
• Total Posts
3007450

×