Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use CWinThread in a COM object? I encountered a linking error.

Status
Not open for further replies.

yumingcs

Programmer
Nov 14, 2003
1
US
I have a COM object and one of the function need to create a worker thread, In order to use CWinThread class, I need to include the afxwin.h, right? after I added the include statement, I got this linking problem:

Linking...
nafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in CallBackSvr.obj
nafxcwd.lib(dllmodul.obj) : warning LNK4006: _DllMain@12 already defined in CallBackSvr.obj; second definition ignored
Creating library Debug/CallBackSvr.lib and object Debug/CallBackSvr.exp
Debug/CallBackSvr.dll : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.

How should I do this??? Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top