Solved

Unresolved External Symbols

Posted on 2016-09-19
3
156 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 29

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 34

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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 viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

734 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