Solved

Unresolved external symbol _imp_*

Posted on 1998-01-06
2
2,697 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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 shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

830 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