Solved

Unresolved External Symbols

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

756 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