Solved

Unresolved External Symbols

Posted on 2016-09-19
3
54 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 32

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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…

760 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

18 Experts available now in Live!

Get 1:1 Help Now