   How To Read: LNK Errors
  What I'm trying to ask, is how to read LNK errors?I know that Microsoft technical supports have trained technicians and programmers at hand. They are trained to aid people with their problems.I don't like myself to be helpless whenever I see a LNK problem that I can't fix or don't know what to do to fix it. I hate that feeling of guilt and weak...I wanted to train myself to do this on my own. I need something, like a dictionary or something, but not like what MSDN Library has in store. Those stuffs have a lot of unnecessary idioms and vocabulary that won't aid in actually fixing the problem directly; it would only tell us the description of the error, but no direct answers on how to fix the problem.Can't there be anything like a dictionary? You want to find a word's definition as quickly as possible (similar to wanting to know the main cause of the LNK error and the accompanied with the solution of the fix), isn't that simple?Or is it because the types of LNK Errors have something in common, but all sorts of solutions can be probable? Else, if all of the above are pretty much just nonsense, forget those then. What do I do to improve myself on how to read the errors? :(Thanks in advance.   
  Can you give us some examples of what linking errors you find hard to read?Most of them resolve to simply not including the right .libs or .cpp files.   ;  I think you should learn to read and use the MSDN documentation properly; it provides documentation for all the linker errors, and the descriptions are pretty good.For example, if I look up LNK2019 on MSDN I get this page: Linker Tools Error LNK2019The page contains:A basic explanation of the errorSeveral samples of code which cause the errorA list a common problems that cause the errorInformation on getting your linker to generate additional informationLinks to further informationA section of "community informationIf all of that isn't enough to help you track down and solve the problem then you probably need to work on your programming skills rather than looking for "better" information.If you want to practice your error-solving skills you could try producing the errors on purpose and seeing what you need to change to fix them.  If you can't figure out how to cause the errors yourself you could start with the sample code from a page like the one I linked to, and then try causing it in your own code.Hope that helps. [smile]   ;  At this point I've seen so many compiler errors that I intuitively know what 99% of them mean even if they don't state what's really wrong with my code. Why don't you post your errors so we can take a look at it?   ;  If you're not doing anything really exotic, there are really only two possible linker errors: undefined symbols, and multiply defined symbols. Both of these are explained in detail in our article.   ;Quote:Original post by BSVinoAt this point I've seen so many compiler errors that I intuitively know what 99% of them mean even if they don't state what's really wrong with my code. Why don't you post your errors so we can take a look at it?I don't have the errors right now, as it's not the main point here. My only problem is that I lack sufficient knowledge of almost 99% of the compiler errors, and wishing to know what I need to do about it.1. Does this implies that we need to "ask one, get one" strategy of fixing problems found commonly in the IDE in this forum?2. Do you have an article around here somewhere that you post your experiences of solving compiler errors on it?3. Because in my country, we lack sufficient resources and resource localizations. I wondered if there's a "Problem Solving" type exams or homework that we can practice reading compiler errors on? Like, school's homework given for us to solve, we practically use our knowledge on the homework to make sure we adept to it, and we learn stuffs. Same relation applies here.4. What if compiler errors have these %/$& signs? What's there to lose if we don't have homework?   ;Quote:Original post by tom_mai781011. Does this implies that we need to "ask one, get one" strategy of fixing problems found commonly in the IDE in this forum?Generally the more specific your question is the better chance you have of getting it answered.Quote:Original post by tom_mai781012. Do you have an article around here somewhere that you post your experiences of solving compiler errors on it?No sorry but that might be a good idea to write.Quote:Original post by tom_mai781014. What if compiler errors have these %/$& signs? What's there to lose if we don't have homework?I think you're talking about the mangling. As your code is compiled, it goes through a process that mangles the name of your functions and variables. By the time it gets to the linker it might have all this crap on the beginning or end of your names, but generally it's safe to ignore that crap and assume that it's talking about your original function. For example in my game if I remove one random method I get the linker talking about "?WindowResize@CDigitanksWindow@@QAEXHH@Z" when it really means CDigitanksWindow::WindowResize()   ;  I can tell you the most common link errors for me are when i declare a class but forget to define it's functions,and when i accidentally make file A include file B while file B includes file A.   ;Quote:Original post by tom_mai78101I don't have the errors right now, as it's not the main point here. My only problem is that I lack sufficient knowledge of almost 99% of the compiler errors, and wishing to know what I need to do about it.I don't blame you. Compiler writer seem to be borderline autistic when it comes to UI design (and yes, error messages are a UI). Both VC and GCC have some obscure messages that took me years before I could figure out, and even then the wording is still shit. I believe productivity loss will decrease as soon as compilers like Clang raise the bar..;  90% of linker errors are either you forgot to define something that you declare in a header or you forgot to include in the project a .lib file that your code depends on. After that maybe the next one would be linking to the wrong version of a library. Beyond that I can't really think of any...   