Jump to content
  • Advertisement
Sign in to follow this  
Robert007

MUD Game Programming: Compilation error from VC2008 IDE

This topic is 3253 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

[PROBLEM SOLVED: I should have included all the ThreadLib files (*.h and *.cpp) into the new console project together with the Demo03-01.cpp.] I am new to this forum and trying my hands on source code that comes with book "MUD Game Programming". Specifically, I included "ThreadLib/ThreadLib.h" in VC++2008 Prof IDE to execute the Demo03-01.cpp - Basic Threading of the book. However I got the following link error:
1>------ Build started: Project: Demo03-01_ThreadingBasics, Configuration: Debug Win32 ------
1>Compiling...
1>Demo03-01.cpp
1>Linking...
1>Demo03-01.obj : error LNK2001: unresolved external symbol "class 
std::map<unsigned long,void *,struct std::less<unsigned long>,class 
std::allocator<struct std::pair<unsigned long const ,void *> > > 
ThreadLib::g_handlemap" 
(?g_handlemap@ThreadLib@@3V?$map@KPAXU?$less@K@std@@V?$allocator@U?$pair@$$CBKPA
X@std@@@2@@std@@A)
1>Demo03-01.obj : error LNK2019: unresolved external symbol "unsigned long
 __stdcall ThreadLib::DummyRun(void *)" (?DummyRun@ThreadLib@@YGKPAX@Z)
 referenced in function "unsigned long __cdecl ThreadLib::Create(void 
(__cdecl*)(void *),void *)" (?Create@ThreadLib@@YAKP6AXPAX@Z0@Z)
1>C:\UTM_MUD\Demos\Demo03-01_ThreadingBasics\Debug\Demo03-01_ThreadingBasics.exe : fatal error LNK1120: 
2 unresolved externals
1>Build log was saved at "file://c:\UTM_MUD\Demos\Demo03-01_ThreadingBasics
\Demo03-01_ThreadingBasics\Debug\BuildLog.htm"
1>Demo03-01_ThreadingBasics - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Could anyone know what is wrong? Thank you in advance. NOTE: I can run the original source code project with VC2008 successfully. The above error occurred in a new project after (1) I created a console program; (2) pasted the Demo03-01.cpp; (3) included the "ThreadLib/ThreadLib.h" into a new project. What did I miss? PROBLEM SOLVED: I should have included all the ThreadLib files (*.h and *.cpp) into the new console project together with the Demo03-01.cpp. [Edited by - Robert007 on July 23, 2009 8:36:04 PM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!