Hi, now the new 7.0 upgrade for the gdk has come out, I went to reinstall the gdk. I forgot about the frustrating prerequisites of needing an old directx verision to use this. I can't no longer simply place the old dplayx.lib in the libs folder to make it stop giving me errors that it cant find certain networking related functions. Dunno why... something about a bad format...
All that happens because I choose to keep up with latest DirectX SDK technology and have the latest DX SDK installed.
Anyways, to the main point! How to make a dummy multiplayer.lib!
Create a new visual studio 2008 "Win32 Project", named "multiplayer". Make sure before you create the new project, that in the application settings, you select "Static Library". Then Press "finish".
Here's my multiplayer.cpp code...
#include "stdafx.h"
void __cdecl PassCoreDataMultiplayer(void *)
{ //dummy function
return; }
void __cdecl SetErrorHandlerMultiplayer(void *)
{ //dummy function
return; }
void __cdecl DestructorMultiplayer(void)
{ //dummy function
return; }
void __cdecl ConstructorMultiplayer(void)
{ //dummy function
return; }
void __cdecl RefreshD3DMultiplayer(int)
{ //dummy function
return; }
After compiling it, you will want to place your new multiplayer.lib in the DarkGDK -> lib -> vs9 directory. BUT FIRST, make sure you rename the old multiplayer.lib or copy it to a safe folder so you dont loose it. Now you should be able to use DarkGDK with the latest version of the DirectX SDK installed on your machine.
--------------
UPDATE[August 6, 2009]: For some reason I was getting some kind of warning with my dummy multiplayer.lib. Doesn't matter what it was. I just recompiled it a bit different this time. Works a charm now. Different how?
Like above except on the page where you select it to be static library, make sure you have nothing else checked( ie: make sure the precompiled headers is NOT checked ).
So this time you will not have the #include "stdafx.h" code generated. good. So rest of code is the same:
void __cdecl PassCoreDataMultiplayer(void *)
{ //dummy function
return; }
void __cdecl SetErrorHandlerMultiplayer(void *)
{ //dummy function
return; }
void __cdecl DestructorMultiplayer(void)
{ //dummy function
return; }
void __cdecl ConstructorMultiplayer(void)
{ //dummy function
return; }
void __cdecl RefreshD3DMultiplayer(int)
{ //dummy function
return; }
When I compile this code this way, my seperate Dark GDK project will say this to me:
multiplayer.lib(main.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
The is because as default for my Visual Studio 2008 Standard, it has link time code generation turned on. That allows a program that uses a library with that turned on to optimize the library as it sees fit. Forget that. Do this:
In the Configuration Options-> C/C++ -> Optimizations window: Set Whole Program Optimization to No. Then if you want, Set Faver Size Or Speed to either or neither. I would set it to size because it has nothing really to optimize for speed. Now when I compile my dummy muliplayer.lib, I get no warnings what so ever with my Dark GDK projects. Hoorah!
--------------
Well, on a side note. I see other people had this problem as I look through old threads. After making the dummy multiplayer.lib to stop the nutty errors, I got this specific error:
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
... basically needing me to set /NODEFAULTLIB:msvcrtd.lib. I placed "/NODEFAULTLIB:msvcrtd.lib" in the configuration properties -> Linker -> Command Line -> Additional Options. Just in case somebody else runs into that problem.
Now it runs without errors for me. That multiplayer dll really needs to be ditched, IMHO. It uses old unsecure DirectX network technology. At least give us an option to disable it somehow. Heck, Michael P's MikeNet library could be used in place of it. Or even better, TGC hires Michael P to create a new DarkNETWORK dll. That would be cool. [ EDIT: Wow, I said that before DarkNet officialy came out! Had no idea... ]
----------------------------
UPDATE[April 29, 2009]: No longer have an attachment of that library here. Due to a microsoft service update, the library errors out when compiling with it. The fix, simply compile your own dummy "multiplayer.lib" static library with the above code.