damn unresolved externals

Started by
3 comments, last by Joe Forhens 20 years, 12 months ago
What the best strategy to debug them ? How can i track what''s causing them ?
Thank you all :)
Advertisement
if you''re using msvc, the most info it''ll give you is a decorated function/variable name, so look at that. if it''s a function or variable that you wrote in your code, then make sure you have that declared somewhere. if it''s something from a library you''re using, make sure you''re linking with the library.
thanks , now i''m almost convinced that msvc++ won''t help me to further track down exactly what''s causing it I fixed it btw
Thank you all :)
No, it won''t. Not directly anywayz... But, then, most compilers are like this, you get to know what those errors "really mean" once you''ve worked with them for a while.
---------------------------------------------------There are 10 kinds of people in the world:Those that understand binary, and those that dont...Mage
The term "Unresolved externals" means that the compiler can not locate where the variable is defined, or where the function is implemented. Now off the top of my head there are 2 ways this can happen:

#1. You didn''t include all the needed .lib, .cpp, or .dll files that were needed.

#2. Your using an extern variable and didn''t define it anywhere.

These types of errors happen to be the most difficult to track down but once you know why they are happening you can narrow the field down a bit.

#1. Check the documentation. If your linking to something like directX, often times the documentations help files will tell you which libraries are needed to link (for instance dxguid.lib and ddraw.lib if your compiling a direct draw application).

#2. If the unresolved external is related to your code IE: "Unresolved external myclass::myclass();" check to make sure that your .cpp file for myclass is in the project, and includes myclass.h

#3. If it''s happening on an extern variable look around to see where the extern is initially set and make sure that it''s including the header file which defines the extern.

#4. If It''s happening on variables not of your own creation then check to make sure you''ve got the right libraries/.dlls included.

#5. And finally make sure your lib/header paths in Visual C++ are setup correctly so that it can locate the needed libraries/dlls/cpps it needs.

This topic is closed to new replies.

Advertisement