Unresolved external?

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
samhwang
In need of some credit
In need of some credit
Posts: 9
Joined: Wed Mar 09, 2005 3:54 pm

Unresolved external?

Post by samhwang »

I built a helloworld app but received the following errors:

--------------------Configuration: App02 - Win32 Debug--------------------
Linking...
wxmswd.lib(app.obj) : error LNK2001: unresolved external symbol __imp__InitCommonControls@0
wxmswd.lib(utils.obj) : error LNK2001: unresolved external symbol _WSACleanup@0
wxmswd.lib(utils.obj) : error LNK2001: unresolved external symbol _gethostbyaddr@12
wxmswd.lib(utils.obj) : error LNK2001: unresolved external symbol _gethostbyname@4
wxmswd.lib(utils.obj) : error LNK2001: unresolved external symbol _gethostname@8
wxmswd.lib(utils.obj) : error LNK2001: unresolved external symbol _WSAStartup@8
wxmswd.lib(statbr95.obj) : error LNK2001: unresolved external symbol __imp__CreateStatusWindowA@16
wxmswd.lib(spinbutt.obj) : error LNK2001: unresolved external symbol __imp__CreateUpDownControl@48
wxmswd.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_Create@20
wxmswd.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_Destroy@4
wxmswd.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_GetImageCount@4
wxmswd.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_GetIconSize@12
wxmswd.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_Add@12
wxmswd.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_AddMasked@12
wxmswd.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_ReplaceIcon@12
wxmswd.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_Replace@16
wxmswd.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_Remove@8
wxmswd.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_Draw@24
wxmswd.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_SetBkColor@8
wxmswd.lib(uuid.obj) : error LNK2001: unresolved external symbol __imp__UuidToStringA@8
wxmswd.lib(uuid.obj) : error LNK2001: unresolved external symbol __imp__RpcStringFreeA@4
wxmswd.lib(uuid.obj) : error LNK2001: unresolved external symbol __imp__UuidCreate@4
wxmswd.lib(uuid.obj) : error LNK2001: unresolved external symbol __imp__UuidFromStringA@8
Debug/App02.exe : fatal error LNK1120: 23 unresolved externals
Error executing link.exe.

App02.exe - 24 error(s), 0 warning(s)


What's wrong??? Thx!
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

This is IDE related, so it would REALLY help if you mention:
- Platform
- wx version
- IDE

Or else people will not reply ;-)

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Cursor
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Aug 29, 2004 3:09 pm
Location: Grenoble, France
Contact:

Post by Cursor »

It is tipically a link problem.
Have you link all needed library ? Have you defined all needed preprocessor definition ?

http://wiki.wxwidgets.org/wiki.pl?MSVC_Setup_Guide
SnakeChomp
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 235
Joined: Sun Oct 10, 2004 2:53 am

Post by SnakeChomp »

Your project file is missing windows libraries to link against. Just look up the function names on MSDN and it will tell you what libraries you need.
Linkku
Knows some wx things
Knows some wx things
Posts: 33
Joined: Sun Jan 02, 2005 5:16 pm

Re: Unresolved external?

Post by Linkku »

samhwang wrote: wxmswd.lib(app.obj) : error LNK2001: unresolved external symbol __imp__InitCommonControls@0
-lcomctl32
samhwang wrote: wxmswd.lib(uuid.obj) : error LNK2001: unresolved external symbol __imp__UuidToStringA@8
-luuid
samhwang wrote: wxmswd.lib(utils.obj) : error LNK2001: unresolved external symbol _WSACleanup@0
-lwsock32
--- http://linkku.has.it ---

- Debian Etch, KDevelop3, Anjuta2, wxWidgets CVS, GCC 3.3
- Windows XP, wxDevCpp, wxWidgets 2.6.1
Post Reply