Cryptic compiler/linker error messages with C++ templates

  • Thread starter Generic Usenet Account
  • Start date
G

Generic Usenet Account

Don't you often wish that compiler and linker messages for templates
were a little less cryptic and misleading?
Consider this:

I was getting this error message:
undefined reference to `vtable for <class-name>'

It turned out that I had not linked in the source for a virtual member
function. In hindsight, the message does make sense, but I must admit
that its verbiage threw me off for a while.

I have seen a similar thing with STL. A small syntax error may lead to
a barrage of error messages in the underlying Red-Black tree
implementation, which may completely throw off an unsuspecting
programmer.

--Gus
 
V

Victor Bazarov

Generic said:
Don't you often wish that compiler and linker messages for templates
were a little less cryptic and misleading?

Yes. And I also often wish we had more free tools that did most of the
work for us, and that my employers were more generous, and the weather
were milder, and the roads didn't have pot-holes. What's your point, Gus?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top