Forum

compiling darkplaces

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

compiling darkplaces

Postby Hazematman » Fri Oct 08, 2010 6:31 pm

when I tried compiling the newest version of dark places engine, I get a couple of errors saying I'm missing files like dsound.h and d3dx9.h. Im guessing these are part of the direct x sdk, which version of direct x sdk do I download?
User avatar
Hazematman
 
Posts: 54
Joined: Thu Jul 15, 2010 1:58 am
Location: Canada

Postby mh » Fri Oct 08, 2010 9:14 pm

Any recent version should be good enough. I've successfully compiled DP using VC++ 2008 Express with both the August 2008 and the February 2010 SDKs in the past. It even ran! :D
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
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Hazematman » Sun Oct 10, 2010 1:01 am

I compiled darkplaces with direct x sdk February 2010 and I get these three errors

Code: Select all
1>model_alias.obj : error LNK2019: unresolved external symbol "void __cdecl Mod_Skeletal_AnimateVertices_Generic(struct model_s const * __restrict,struct frameblend_s const * __restrict,struct skeleton_s const *,float * __restrict,float * __restrict,float * __restrict,float * __restrict)" (?Mod_Skeletal_AnimateVertices_Generic@@YAXPIBUmodel_s@@PIBUframeblend_s@@PBUskeleton_s@@PIAM333@Z) referenced in function "void __cdecl Mod_Skeletal_AnimateVertices(struct model_s const * __restrict,struct frameblend_s const * __restrict,struct skeleton_s const *,float * __restrict,float * __restrict,float * __restrict,float * __restrict)" (?Mod_Skeletal_AnimateVertices@@YAXPIBUmodel_s@@PIBUframeblend_s@@PBUskeleton_s@@PIAM333@Z)

1>model_alias.obj : error LNK2019: unresolved external symbol "void __cdecl Mod_Skeletal_AnimateVertices_SSE(struct model_s const * __restrict,struct frameblend_s const * __restrict,struct skeleton_s const *,float * __restrict,float * __restrict,float * __restrict,float * __restrict)" (?Mod_Skeletal_AnimateVertices_SSE@@YAXPIBUmodel_s@@PIBUframeblend_s@@PBUskeleton_s@@PIAM333@Z) referenced in function "void __cdecl Mod_Skeletal_AnimateVertices(struct model_s const * __restrict,struct frameblend_s const * __restrict,struct skeleton_s const *,float * __restrict,float * __restrict,float * __restrict,float * __restrict)" (?Mod_Skeletal_AnimateVertices@@YAXPIBUmodel_s@@PIBUframeblend_s@@PBUskeleton_s@@PIAM333@Z)

1>C:\stuff\dp\darkplaces-debug.exe : fatal error LNK1120: 2 unresolved externals


Some help would be greatly appreciated.
User avatar
Hazematman
 
Posts: 54
Joined: Thu Jul 15, 2010 1:58 am
Location: Canada

Postby Spike » Sun Oct 10, 2010 9:11 am

c++ name mangling?
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby mh » Sun Oct 10, 2010 12:19 pm

Spike wrote:c++ name mangling?

Agreed. You're definitely doing something weird, like compiling the source as C++ (Visual C++ let's you select this option even for .c files).

Those errors have nothing to do with DirectX by the way, they're functions in Darkplaces itself.
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
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Hazematman » Sun Oct 10, 2010 4:28 pm

Ok, then how would I set it to compile as c and not c++?

edit: I went to properties, c/c++, advance and I changed it from c++ to c and I still get the same errors.
User avatar
Hazematman
 
Posts: 54
Joined: Thu Jul 15, 2010 1:58 am
Location: Canada

Postby Chip » Sun Oct 10, 2010 8:11 pm

mh wrote:Any recent version should be good enough. I've successfully compiled DP using VC++ 2008 Express with both the August 2008 and the February 2010 SDKs in the past. It even ran! :D


I've also used the Express version and it worked like a charm. The source was set to Debug instead of Release, but this can easily be changed.
QuakeWiki
getButterfly - WordPress Support Services
Roo Holidays

Fear not the dark, but what the dark hides.
User avatar
Chip
 
Posts: 575
Joined: Wed Jan 21, 2009 9:12 am
Location: Dublin, Ireland

Postby mh » Sun Oct 10, 2010 9:36 pm

I just compiled the debug version and it worked perfectly. I generally always go for the debug version first, and I tend to think less of any engine where the debug version doesn't compile (or doesn't exist!)

Like, it's not really a great indicator that the thing has been tested, is it?
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
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby r00k » Mon Oct 11, 2010 11:37 pm

My debug config works in XP but not under Win7 unless i use "attach to process". I have to run the .\GLDebug\glQrack.exe in compatibility mode, for some strange reason. Which doesnt work through the debug menu option.

Under Win7 i get this...
Debug Assertion Failed!
Program: glQrack.exe
File: f:\dd\vctools\crt_bld\self_x86\crt\src\dbgheap.c

Expression: _CrtIsValidHeapPointer(pUserData)
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Postby mh » Tue Oct 12, 2010 1:21 am

You're still calling free on that static array, are you? In CL_ParseServerInfo, the "char url[1024]" array? And likewise folder and name?
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
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby r00k » Tue Oct 12, 2010 2:06 am

no i think its actually from the

free (smokedata);

from gl_smokes.c in the lava smoke tutorial code :O

the debugger did recently warn me about

if (isPlayer)

in CL_ParseUpdate not being initialized.

but that error i posted above is printed immediately when i start the debugger.
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Postby mh » Tue Oct 12, 2010 1:51 pm

There's another in Mod_BuildDetailTexture:
Code: Select all
   byte data[DETAILRESOLUTION][DETAILRESOLUTION][4],
.
.
.
      free (data);

Also R_InitOtherTextures.

But yeah, smokedata (and basedata in the same function) are also static arrays which are being free'd. I guess XP had app compatibility settings for this kind of thing which were always on, whereas later versions don't.
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
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest