Solved

Unresolved External Symbols

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

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…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

832 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