Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / No multiplayer.lib please. How to make a dummy multiplayer.lib

Author
Message
Todd Riggins
19
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 11th Nov 2008 00:57 Edited at: 4th Sep 2010 07:20
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...


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:



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.

ExoDev.Com - A Game Development Community Website! Featuring: XBOX360 CONTROLLER LIBRARY
sydbod
15
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 11th Nov 2008 01:34
Let me get this straight.

The later versions of DirectX SDK no longer have support for the networking within DirectX DirectPlay ?????

Ouch, that hurts.

Is it true that they have also removed DirectDraw? ..... or don't we use DirectDraw within Dark GDK?

By the way, thanks for creating that library
Todd Riggins
19
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 11th Nov 2008 01:45 Edited at: 4th Sep 2010 07:20
NP sydbod. I forget what version it was, but they no longer include the directplay library with the SDK distributions. I have no idea about DirectDraw stuff. Never really dealt with it ever since DirectX 8 came along.

ExoDev.Com - A Game Development Community Website! Featuring: XBOX360 CONTROLLER LIBRARY
Ood
15
Years of Service
User Offline
Joined: 18th Aug 2008
Location:
Posted: 23rd Nov 2008 02:23
You just saved me a lot of headaches figuring out how to get around this problem

Login to post a reply

Server time is: 2024-03-28 19:33:17
Your offset time is: 2024-03-28 19:33:17