Solved

Unresolved external symbol _imp_*

Posted on 1998-01-06
2
2,659 Views
Last Modified: 2008-02-01
I am using "Windows Sockets Network Programming" by Bob Quinn and Dave Shute sample programs with MS Visual C++ 5.0
Being new to C++ I imported the make file for the sample
applications that are on web site "www.sockets.com" and
tried to build the applications. I get the following unresolved external messages and can't figure out where they
are coming from. Maybe it's the compile or link options ??

Deleting intermediate files and output files for project 'UATIME32 - Win32 Debug'.
--------------------Configuration: UATIME32 - Win32 Debug--------------------
Compiling resources...
Compiling...
UA_TIME.C
C:\Program Files\DevStudio\VC\INCLUDE\winnt.h(199) : warning C4201: nonstandard extension used : nameless struct/union
D:\joe\WSSAMPLE\UA_TIME\..\wsa_xtra.h(40) : warning C4005: 'IP_TTL' : macro redefinition
D:\joe\WSSAMPLE\UA_TIME\UA_TIME.C(115) : warning C4047: '=' : 'void *' differs in levels of indirection from 'const int '
D:\joe\WSSAMPLE\UA_TIME\UA_TIME.C(428) : warning C4514: 'Int64ShllMod32' : unreferenced inline function has been removed
D:\joe\WSSAMPLE\UA_TIME\UA_TIME.C(428) : warning C4514: 'Int64ShraMod32' : unreferenced inline function has been removed
D:\joe\WSSAMPLE\UA_TIME\UA_TIME.C(428) : warning C4514: 'Int64ShrlMod32' : unreferenced inline function has been removed
D:\joe\WSSAMPLE\UA_TIME\UA_TIME.C(428) : warning C4514: 'GetFiberData' : unreferenced inline function has been removed
D:\joe\WSSAMPLE\UA_TIME\UA_TIME.C(428) : warning C4514: 'GetCurrentFiber' : unreferenced inline function has been removed
Linking...
   Creating library WinDebug/UATIME32.lib and object WinDebug/UATIME32.exp
LINK : warning LNK4098: defaultlib "LIBCD" conflicts with use of other libs; use /NODEFAULTLIB:library
UA_TIME.OBJ : error LNK2001: unresolved external symbol __imp__UnregisterClassA@8
UA_TIME.OBJ : error LNK2001: unresolved external symbol __imp__DispatchMessageA@4
UA_TIME.OBJ : error LNK2001: unresolved external symbol __imp__TranslateMessage@4
UA_TIME.OBJ : error LNK2001: unresolved external symbol __imp__GetMessageA@16
UA_TIME.OBJ : error LNK2001: unresolved external symbol __imp__UpdateWindow@4
UA_TIME.OBJ : error LNK2001: unresolved external symbol __imp__ShowWindow@8
UA_TIME.OBJ : error LNK2001: unresolved external symbol __imp__CreateWindowExA@48
UA_TIME.OBJ : error LNK2001: unresolved external symbol __imp__RegisterClassA@4
UA_TIME.OBJ : error LNK2001: unresolved external symbol __imp__LoadCursorA@8
UA_TIME.OBJ : error LNK2001: unresolved external symbol __imp__LoadIconA@8
UA_TIME.OBJ : error LNK2001: unresolved external symbol __imp__PostQuitMessage@4
WSOCK32X.lib(WIN_MGR.OBJ) : error LNK2001: unresolved external symbol __imp__MoveWindow@24
WSOCK32X.lib(WIN_MGR.OBJ) : error LNK2001: unresolved external symbol __imp__GetWindowRect@8
WSOCK32X.lib(WIN_MGR.OBJ) : error LNK2001: unresolved external symbol __imp__GetDesktopWindow@0
WinDebug/UATIME32.exe : fatal error LNK1120: 33 unresolved externals
Error executing link.exe.
Creating browse info file...

UATIME32.exe - 40 error(s), 119 warning(s)
0
Comment
Question by:Tech085
2 Comments
 
LVL 7

Accepted Solution

by:
galkin earned 50 total points
ID: 1177604
You must link your project with kernel32.lib, gdi32.lib and user32.lib
0
 

Author Comment

by:Tech085
ID: 1177605
Still have the following externals to resolve:

 --------------------Configuration: UATIME32 - Win32 Debug--------------------
Linking...
   Creating library WinDebug/UATIME32.lib and object WinDebug/UATIME32.exp
UA_TIME.OBJ : error LNK2001: unresolved external symbol _strlen
UA_TIME.OBJ : error LNK2001: unresolved external symbol _ctime
UA_TIME.OBJ : error LNK2001: unresolved external symbol _time
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
WSOCK32X.lib(WSA_ADDR.OBJ) : error LNK2001: unresolved external symbol _strcmp
WinDebug/UATIME32.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.

UATIME32.exe - 6 error(s), 0 warning(s)

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

  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 …
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 goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

914 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

19 Experts available now in Live!

Get 1:1 Help Now