compiling irrlicht.dll with MSVC++ 2005 and DirectX9

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
gmayer
Posts: 8
Joined: Mon Mar 17, 2008 4:47 pm
Location: Vancouver, Canada

compiling irrlicht.dll with MSVC++ 2005 and DirectX9

Post by gmayer »

hello
I downloaded irrlicht 1.4 and opened the BuildAllExamples.sln

examples that just use the precompiled dll seem to work fine.

I'd just like to be able to compile my own dll as well, since there seems to be no reason I shouldn't be able to.

to get rid of various errors/warnings, I commented out:
//#define _IRR_COMPILE_WITH_DIRECT3D_8_
and just left
#define _IRR_COMPILE_WITH_DIRECT3D_9_

however, when I try and build a debug dll, I get hundreds and hundreds of errors, starting with:

1>c:\program files\microsoft xbox 360 sdk\include\win32\vs2005\d3d9gpu.h(105) : error C2146: syntax error : missing ';' before identifier 'GPU_CONVERT_CPU_TO_GPU_ADDRESS'

any help would be much appreciated

thanks
greg
gmayer
Posts: 8
Joined: Mon Mar 17, 2008 4:47 pm
Location: Vancouver, Canada

also...

Post by gmayer »

forgot to add - I did search several times for answers to this problem in the forums, but couldn't find anything exactly related.

also, despite the "xbox 360" in the header path, this is definitely the win32 version of the sdk - for some reason Microsoft decided to package them together under the "xbox 360" heading.
the sdk is very recent

thanks again
greg
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

My August 2007 DXSDK does not have a "d3d9gpu.h" file. I'm downloading Feb 2008 now to see if it's new.
Last edited by rogerborg on Tue Mar 18, 2008 8:44 pm, edited 1 time in total.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
gmayer
Posts: 8
Joined: Mon Mar 17, 2008 4:47 pm
Location: Vancouver, Canada

Post by gmayer »

thanks
keep me posted

cheers
Greg
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

i had a large amount of problems with this,

someone i think hybrid or bitplane said,

move the DXSDK in the includes/libraries list down, BELOW the platform SDK

Because if u include platform SDK after the DXSDK, it works for me

let me know
gmayer
Posts: 8
Joined: Mon Mar 17, 2008 4:47 pm
Location: Vancouver, Canada

Post by gmayer »

I'm actually using MSVC++ Professional Edition so I don't explicitly include the platform SDK.

the only include paths I specify are:

..\..\include
zlib
C:\Program Files\Microsoft Xbox 360 SDK\include\win32\vs2005

the first two were already there
I added the third

I suppose I could check the "ignore standard include paths" option, and then explicitly add the platform path myself, but I wonder if that might not trigger a whole new set of problems?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Try to add the dx sdk include path in the project settings, below the platform SDK. It is definitely included, even if you don't have to download it separately (which isn't necessary for 2008 Express either)
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Oh, marzipan. Feb 2008 refuses to install on Win2K. Sorry, I'm done.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
gmayer
Posts: 8
Joined: Mon Mar 17, 2008 4:47 pm
Location: Vancouver, Canada

Post by gmayer »

so I did this

the platfrom sdk is definitely being included before the direct x sdk

but I still get the same compilation erros, starting with:

1>c:\program files\microsoft xbox 360 sdk\include\win32\vs2005\d3d9gpu.h(105) : error C2146: syntax error : missing ';' before identifier 'GPU_CONVERT_CPU_TO_GPU_ADDRESS'

followed by hundreds more

:(
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

Because if u include platform SDK after the DXSDK, it works for me
here is the list i have in my vc directories

Image

notice that the DXSDK is BELOW the plaftform sdk. this is what we are saying, the folder for dx must be included before the platform SDK..

Ask microsoft WHY and you can understand, but it should work
gmayer
Posts: 8
Joined: Mon Mar 17, 2008 4:47 pm
Location: Vancouver, Canada

Post by gmayer »

I appreciate the replies, but note that you stressed both that the dxsdk should be BELOW the platform sdk, and a little later in the same line, that it should be included BEFORE the platform sdk...?


Regardless, I tried both ways, and it still doesn't work.
The first of many many compilation errors comes when compiling CD3D9Texture.cpp:
1>c:\program files\microsoft xbox 360 sdk\include\win32\vs2005\d3d9gpu.h(105) : error C2146: syntax error : missing ';' before identifier 'GPU_CONVERT_CPU_TO_GPU_ADDRESS'

I can't find anything else about this (known issues with d3dgpu.h) on line.

I am truly perplexed - I have a binary dll that works fine with my runtime DirectX9, so surely someone had to be able to compile this???
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Code: Select all

Quick Details
File Name:	dxsdk_march2008.exe
Version:	9.22.1284
Date Published:	3/7/2008
Language:	English
Download Size:	442.1 MB
Downloaded and extracted.

Code: Select all

D:\dev\dxsdk-march-2008>dir /s/b d3d9gpu.h
File Not Found
I have no idea where you're getting that file from. You may want to revisit your assumption that there's a single SDK for Win32 and XBox 360.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
gmayer
Posts: 8
Joined: Mon Mar 17, 2008 4:47 pm
Location: Vancouver, Canada

Post by gmayer »

I think you are exactly right.

I was digging into the sdk documentation and found this note:

Xbox 360 Library for Windows
The Xbox 360 XDK ships with libraries for both Xbox 360 and Microsoft Windows. Using the Xbox 360 library for Windows, you can build tools to help you allocate resources, process shaders, and so on. Note that it is not possible to create an IDirect3DDevice9 display context on Windows using the Xbox 360 library for Windows.

I already had the 360 sdk on my machine for work-related development, and saw a win32 folder in there, and assumed that was equivalent to "regular" dx9 for windows.

I'll have to get the 'windows-only' direct x sdk for this.

Thanks again for all the replies.
Greg
Post Reply