Solved

Unresolved external symbol _imp_*

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
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…
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 clear a vector as well as how to detect empty vectors in C++.

776 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