Solved

Unresolved External Symbols

Posted on 2016-09-19
3
68 Views
Last Modified: 2016-09-22
Hi.  I am trying to compile old C++ code using Visual Studio 2015, and I am getting "unresolved external symbols" errors such as the following:

Error	LNK2001	unresolved external symbol __imp___sys_errlist	
Error	LNK2001	unresolved external symbol __imp___iob	
Error	LNK2001	unresolved external symbol __imp___pctype	
Error	LNK2001	unresolved external symbol __imp___sys_nerr	
Error	LNK2001	unresolved external symbol __imp____mb_cur_max	

Open in new window


I tried various suggestions from the Internet, but nothing seems to resolve this issue.  Could you please provide me with suggestions?  (Please let me know if I need to provide more information.)  Thank you.
0
Comment
Question by:deatc
3 Comments
 
LVL 28

Expert Comment

by:pepr
ID: 41805165
Errors like that mean that you have the sources and headers, but you did not specified the library for the linker.

Have a look here https://msdn.microsoft.com/en-us/library/ms235627.aspx#BKMK_UseLibInApp
0
 
LVL 33

Accepted Solution

by:
sarabande earned 500 total points
ID: 41806694
the ___imp___ prefix is an indication that the externals should be instantiated by an 'implementation class' what is a technique used by 3rd-party or library vendors to hide some or the greater part of their implementation Interface only in object code and not in header files. as pepr has told, the missing instantiation of the externals normally should be provided by a library which you would need to add to the linker - input - additional dependencies for both debug and release configuration.

to find out which library is missing you may look into the old project file (or makefile). the Project files have Extension .vcxproj, .vcproj, or .dsp depending on the vs version. open it with c++ text editor (open with ... menu item) and look for .lib files. check whether all the .lib files defined for the link command also were used in the new project linker properties.

Sara
0
 

Author Closing Comment

by:deatc
ID: 41811410
Thanks!
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…
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 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.
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.

896 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

17 Experts available now in Live!

Get 1:1 Help Now