Help compiling Darkplaces
Moderator: InsideQC Admins
11 posts
• Page 1 of 1
Help compiling Darkplaces
So, hum... I was trying to compile the latest Darkplaces source (windows, non-SDL) but it's complaining about some missing DirectX 9 header. Then I looked for any instructions on how to solve it in the package and... Nothing. Checked the page... Nope. Checked the Darkplaces Wiki, found a section "compiling the source code", and... not done yet. Can anyone point me at some page, tutorial, help text, anything on how to fix this dependency ?
EDIT:Herp derp. Just found a thread about this. Sorry! Please Spirit, don't yell at me!
EDIT:Herp derp. Just found a thread about this. Sorry! Please Spirit, don't yell at me!
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
Re: Help compiling Darkplaces
Even with Windows, use cmd.exe and navigate to the DarkPlaces source folder.
Type "make". Viola.
[Yeah, not an IDE method ... but should work. Disclaimer: I have a lot of extra tools installed on my machines, so small chance I have something in my "path" that calls gcc from Cygwin/Mingw, but I do not believe it is using that. Disclaimer part 2: This is from memory with obviously the idea that MSVC is installed.]
In my experience the IDE project files for DP are not as good and/or update to date and easy as compiling DP via "make."
Type "make". Viola.
[Yeah, not an IDE method ... but should work. Disclaimer: I have a lot of extra tools installed on my machines, so small chance I have something in my "path" that calls gcc from Cygwin/Mingw, but I do not believe it is using that. Disclaimer part 2: This is from memory with obviously the idea that MSVC is installed.]
In my experience the IDE project files for DP are not as good and/or update to date and easy as compiling DP via "make."
Last edited by Baker on Mon Dec 19, 2011 2:45 am, edited 1 time in total.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: Help compiling Darkplaces
If you use standard mingw its missing some of the directx headers you can get the missing ones at the allegro game library site,
but tbh i wonder a bit why they newer fixed it ?.
Mingw64 has a pretty complete directx sdk (upto and including directx11) while mingw only has directx9 and its missing bits and pieces.
Cmd or bash shell is upto preference i think, i like making most work in bash because of its scripting support
makes it a ton easier to automate some of the heavier stuff.
Ofc if your into powershell that might be just as good.
but tbh i wonder a bit why they newer fixed it ?.
Mingw64 has a pretty complete directx sdk (upto and including directx11) while mingw only has directx9 and its missing bits and pieces.
Cmd or bash shell is upto preference i think, i like making most work in bash because of its scripting support
Ofc if your into powershell that might be just as good.
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: Help compiling Darkplaces
Thanks Baker and reckless for the tips. Turns out my Visual Studio setup didn't have the DirectX SDK installed (I could swear that I installed it along the XNA SDK long time ago but seems I was wrong, duh). About a chunky 680Mb download later I managed to compile (and even run !
) the debug version.
But now apparently there's something wrong with this source package (20110628-wgl) because while the original game works fine, if I try to load any mod (dpmod included) I get a crash. Needless to say, the same data files do work flawlessly with my previous darkplaces executable. Oh well, I'll check later if there's some newer stable release on SVN. Thanks again!
But now apparently there's something wrong with this source package (20110628-wgl) because while the original game works fine, if I try to load any mod (dpmod included) I get a crash. Needless to say, the same data files do work flawlessly with my previous darkplaces executable. Oh well, I'll check later if there's some newer stable release on SVN. Thanks again!
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
Re: Help compiling Darkplaces
i noticed the same with various versions of msvc it seems to be runtime related,
some versions work with msvc8 and up but some make some weird runtime errors in later versions of msvc like 2010.
One of the reasons i stick with mingw
it allways uses the standard msvcrt 6 runtime unless explicitly told otherwise.
some versions work with msvc8 and up but some make some weird runtime errors in later versions of msvc like 2010.
One of the reasons i stick with mingw
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: Help compiling Darkplaces
frag.machine wrote:Thanks Baker and reckless for the tips. Turns out my Visual Studio setup didn't have the DirectX SDK installed (I could swear that I installed it along the XNA SDK long time ago but seems I was wrong, duh). About a chunky 680Mb download later I managed to compile (and even run !) the debug version.
But now apparently there's something wrong with this source package (20110628-wgl) because while the original game works fine, if I try to load any mod (dpmod included) I get a crash. Needless to say, the same data files do work flawlessly with my previous darkplaces executable. Oh well, I'll check later if there's some newer stable release on SVN. Thanks again!
Just some info ... I *never* installed whatever DX stuff to compile DarkPlaces via the command line.
I'm kind of a contrarian and would never install DX9 SDK stuff to compile any of my engine work. Sure I keep up with everything MH does because -- well, I pay a great deal of attention to anything MH does because he really knows his stuff
I guess the short version is: whatever these missing things are they appear to be unnecessary for command line compile of DarkPlaces. At least the versions I've attempted to compile ... and that 2010 April one would have been the most recent I would have tried. [MSVC 2008 would have been what I had installed, MH has ripped on MSVC 2010 .... btw. Final note MSVC Express 2008 is *still* available as a download.]
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: Help compiling Darkplaces
I'm not a fan of what Microsoft have done with 2010. The only really worthwhile thing it brings to the party is the vastly improved intellisense (although 2008 is easy enough to get damn close to fixing - just shut down the Class View pane and you're 75% of the way there). In return for that however you get a monstrously sluggish UI that takes ages to load and ages to do anything reasonable with, a much slower compiler (for C++, C oddly enough seems a mite faster), some bizarre changes with Find and file navigation (when jumping back and forth between lines of code using the cursor keys), an unaccpetable change to include and lib directory setup, and a few other things I can't remember off the top of my head.
Everyone should have a fairly recent DXSDK installed. Even if you're not doing any DirectX coding, there is a lot of useful info in it, and it's easier and faster to search than online. Knowing some D3D will make you a better OpenGL programmer too (and vice-versa, of course).
Everyone should have a fairly recent DXSDK installed. Even if you're not doing any DirectX coding, there is a lot of useful info in it, and it's easier and faster to search than online. Knowing some D3D will make you a better OpenGL programmer too (and vice-versa, of course).
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
Re: Help compiling Darkplaces
Baker wrote:Just some info ... I *never* installed whatever DX stuff to compile DarkPlaces via the command line.
Huh ? But but but...
- Code: Select all
// vid_wgl.c -- NT GL vid component
#ifdef _MSC_VER
#pragma comment(lib, "comctl32.lib")
#endif
#ifdef SUPPORTDIRECTX
// Include DX libs
#ifdef _MSC_VER
#pragma comment(lib, "dinput8.lib")
#pragma comment(lib, "dxguid.lib")
#endif
#ifndef DIRECTINPUT_VERSION
# define DIRECTINPUT_VERSION 0x0500 /* Version 5.0 */
#endif
#endif
#include "quakedef.h"
#include <windows.h>
#include <mmsystem.h>
#ifdef SUPPORTDIRECTX
#include <dsound.h>
#endif
#include "resource.h"
#include <commctrl.h>
#ifdef SUPPORTDIRECTX
#include <dinput.h>
#endif
#include "dpsoftrast.h"
#ifdef SUPPORTD3D
#include <d3d9.h>
(...)
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
Re: Help compiling Darkplaces
- Code: Select all
#ifdef _MSC_VER
#pragma comment(lib, "dinput8.lib")
#pragma comment(lib, "dxguid.lib")
#endif
My 1st post has a lot of vagueness because I really am not certain if it was using gcc or MSVC's compiler. If gcc, it wouldn't have been looking for those ...
If it used gcc, then it wouldn't have been looking for any of the above.
I do know I never installed any DirectX SDK on that laptop.
(the laptop died on September 22nd, so it isn't available to check ... it occupies a spot in the closet and maybe some day I'll see able recovering the hard drive, although I backup my stuff regularly).
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: Help compiling Darkplaces
depends a bit if you used the mingw64 compiler it certainly does check for directx
(mingw64 supports msvc pragmas).
one but though as far as i know darkplaces only asks for directx in relation to SDL since SDL uses a few headers from it.
I might be wrong on later versions.
one but though as far as i know darkplaces only asks for directx in relation to SDL since SDL uses a few headers from it.
I might be wrong on later versions.
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: Help compiling Darkplaces
Recent DPs (don't know about the most recent) offer a cvar-selectable D3D renderer so they would require a DXSDK to be installed, yeah.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
11 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest