Jump to content
  • Advertisement
Sign in to follow this  

MUD Game Programming: Compilation error from VC2008 IDE

This topic is 3351 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>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 *> > > 
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
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
Sign in to follow this  

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!