tags:

views:

146

answers:

3

Does anyone have a site that teaches how to fix common compiler errors for newbies? Like does not name a type, etc?

+1  A: 

Given the number of different compilers and the very cryptic warnings that use of the stl and boost gives, I usually use Google, but I strip as much unique strings from the query as I can (removing line numbers etc). I usually find that I find a question by someone else who got a similar error, along with (hopefully) an answer on how to fix it.

If you are using a Microsoft compiler, MSDN is very helpful. For example, if I was receiving the error

error LNK2019: unresolved external symbol "int __cdecl DoStuff(struct _Foo *,wchar_t *,struct _Bar ....

MSDN has a page (found by googling for 'error LNK2019') for that error code with common examples of what causes it and how it is fixed. This goes for compiler errors (rather than linker errors) as well.

However, I usually find the MSDN page using Google, as Microsoft sites aren't the easiest to navigate fast, however the other option is just to bookmark the C/C++ build errors page

Yacoby
http://tinyurl.com/y96bsdo
Jacob
A: 

MSDN has a nice reference on what all the compiler errors and warnings mean. They often give example code that causes the error, as well as how to fix it: C/C++ Build Errors

This is the best I could find for GCC: Warning Messages and Error Messages

Other than that, just google the error message as others have suggested. This will often lead you to one of the GCC mailing lists where others are having the same issue.

cwick
+3  A: 

The C++ FAQ is a good source to learn what to do and what not to. Pasting the error message into a search engine often helps, too.

sbi