Solved

Error tracking. (MSVC)

Posted on 1998-08-28
2
483 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

895 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