Sign in to follow this  
Ice_Harley

VS2003 - VS 2005 Linker error (DPLay)

Recommended Posts

I have network application, that uses DirectPlay. All network routines are in separate project (Clients), that creates clients.lib file. That project builds well and gives me lib without any errors or warnings. Then I build main application. No compiler problems, but Linker gives some errors: code: -------------------------------------------------------------------------------- 1>clients.lib(Client.obj) : error LNK2001: unresolved external symbol _CLSID_DP8SP_TCPIP 1>clients.lib(Client.obj) : error LNK2001: unresolved external symbol _CLSID_DirectPlay8Address 1>clients.lib(Client.obj) : error LNK2001: unresolved external symbol _IID_IDirectPlay8Address 1>clients.lib(Client.obj) : error LNK2001: unresolved external symbol _CLSID_DirectPlay8ThreadPool 1>clients.lib(Client.obj) : error LNK2001: unresolved external symbol _IID_IDirectPlay8ThreadPool 1>clients.lib(Client.obj) : error LNK2001: unresolved external symbol _CLSID_DirectPlay8Client 1>clients.lib(Client.obj) : error LNK2001: unresolved external symbol _IID_IDirectPlay8Client -------------------------------------------------------------------------------- I found, that if comment some lines in clients project, no linker error comes. But of course no network action . Here is one of these lines: code: -------------------------------------------------------------------------------- if( FAILED( hr = CoCreateInstance( CLSID_DirectPlay8Address, NULL, CLSCTX_INPROC_SERVER, IID_IDirectPlay8Address, (LPVOID*) &g_pDeviceAddress ) ) ) -------------------------------------------------------------------------------- Other "problem lines" use CLSID_DirectPlay8Address or other "unresolved symbols" too. This linker problem started only when I moved from from VS2003 to VS2005. Before this works good. What should I do to solve this? Maybe somebody knows what lib (or dll) contains that DirectPlay things? Headers are dpaddr.h and dplay8.h. Using: Microsoft DirectX SDK (April 2006) Microsoft Visual C++ 2005 Pro Thanks.

Share this post


Link to post
Share on other sites
Quote:
Original post by Dave Hunt
Try linking with dplayx.lib, dxguid.lib and winmm.lib.


Thanks! This works.
Strange that adding DirectX SDK lib folder in VS options doesn't work. Only linking in project settings.
winmm.lib I even linked before, when had same problems with timeGetTime() function.
Thanks, Dave Hunt!

Share this post


Link to post
Share on other sites
You're very welcome.

Adding the SDK lib directory in the options only tells VS where to look for libraries. You still need to tell it which libraries to look for.

Good luck with the rest of your project.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
been said many many times but...
Quote:
DirectPlay: Microsoft strongly recommends against using DirectPlay to develop new applications. Game developers should use Windows Sockets and the Windows Firewall APIs (see SDK documents for more information).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this