Solved

Error tracking. (MSVC)

Posted on 1998-08-28
2
482 Views
Last Modified: 2006-11-17
I think i have found out a good way to track the cause of link errors like:
error LNK2001: unresolved external symbol _BigTroubleYouDork

Now listen carfully. I will take the solution in small steps.

1. Go to the drive:\MSDEV directory the where you have your compiler, *.h, *.lib and the MSVC editor.
2. Press F3 and the search engine will pop up with the drive:\msdev as default.
3. Go to the last tab where you have advanced search and write in the textsearch editbox:
    In this example that would be "BigTrobleYouDork".
4. Now you probebly got some headerfiles and lib files.
5. Insert the .lib and/or .h file in the project. And you're done.... It worked for me.

Now the question: I now this is not the right way to solve the problem. I would be happy if somebody teached me the right way.

Yours sincerely
Andla.
0
Comment
Question by:andla
2 Comments
 
LVL 2

Accepted Solution

by:
milenvk earned 20 total points
ID: 1171504
Yes this is not the right way. The right way is to read the documentation carefully if you are using third party libraries. They usually document the names of the lib files that you have to link to and the headers that you have to include. If you are using Win32 services Microsoft's documentation usually mentions the lib or dll where the function that you are using is found and also lists the header files.
I would be comfortable with doing things your way too, but consider a situation where you have two or more libraries (for example release and debug versions) that define your unresolved symbol?
0
 
LVL 1

Author Comment

by:andla
ID: 1171505
Thanks!

Do you know any tools that can scan the program and list the right libs och header or dll that is needed in the project. I used the WNet.... functions for networks and could'nt find any- where that i should put the Mpr.lib in my project. I was hoping that i could find it in the .mak-file but not. The thing is that i cant read .mak-files in MSVC++ 4.1 it only uses .mdp    .
I think that the microsoft documentions are very poor telling the user what lib,dll,header that is used even if the Wnet... is in the doc's.

Your sincerely
Andla.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now