Irrlicht.dll with DIRECT3D9

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
Cyanotype
Posts: 9
Joined: Sat Feb 08, 2014 3:51 am

Irrlicht.dll with DIRECT3D9

Post by Cyanotype »

Hello,
I am looking for the files needed to use the DX9 driver. It works with the VC++ compiler but the MinGW compatible version oddly doesn't have DX9 drivers compiled in (the error message says so).
Anyone can provide me the precompiled dll or tell me how exactly to compile one myself?
The guide on the wiki seems to be outdated, it wasn't possible for me to compile one myself with the information provided there.

Thanks in advance.
SLC
Posts: 21
Joined: Mon Jan 06, 2014 9:41 pm

Re: Irrlicht.dll with DIRECT3D9

Post by SLC »

You need the DirectX SDK to get the DirectX libraries needed by Irrlicht and when you compile Irrlicht you just link your project to those libraries (d3dx9 or d3dx9d for debug) and point it to the include folder in the DirectX SDK installation folder(.\Microsoft DirectX SDK (March 2009)\Include), so that Irrlicht can use DirectX and you must also enable DirectX in IrrCompileConfig.h. Read here and here for more details. Read this post for more details on how to convert the .lib files to .a libraries compatible with MinGW. Also make sure you have the DirectX Runtime installed in your computer and the latest drivers for your graphics card. I used the Code::Blocks project inside the source\Irrlicht folder and added the DirectX libraries to the Build Options > Libraries tab.

Tell me your MinGW GCC version and I'll try to make a precompiled dll for you.
Cyanotype
Posts: 9
Joined: Sat Feb 08, 2014 3:51 am

Re: Irrlicht.dll with DIRECT3D9

Post by Cyanotype »

Yes,
I already tried following that guide and didn't succeed that is why I'm posting :/
After the modifications to IrrCompileConfig.h it doesn't compile anymore giving some errors.
I am not very good at these things or maybe the guide isn't compatible with my compiler, 1.8.1 or june 2010 SDK.

I use "i686-4.8.2-release-posix-dwarf-rt_v3-rev2" from here so I can use std::thread:
http://sourceforge.net/projects/mingw-w ... six/dwarf/

Sorry for the trouble. Thanks.
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: Irrlicht.dll with DIRECT3D9

Post by mongoose7 »

Either post the errors or Google them.
Cyanotype
Posts: 9
Joined: Sat Feb 08, 2014 3:51 am

Re: Irrlicht.dll with DIRECT3D9

Post by Cyanotype »

undefined reference to 'IID_IDirectInput8A'
undefined reference to 'DirectInput8Create@20' (2 times each in file CIrrDeviceWin32.cpp)

It seems it can't find some DX8 specific functions. I downloaded DX8.1 SDK and another (August 2009) and put headers/libs into search directory for compiler/linker but that didn't do it.
SLC
Posts: 21
Joined: Mon Jan 06, 2014 9:41 pm

Re: Irrlicht.dll with DIRECT3D9

Post by SLC »

I think DirectX 8 input system doesn't work with gcc 4.8+. It happened to me and I gave up using DirectX input system and used the other input systems available on windows which Irrlicht had. Read here to find a similar problem which was fixed by defining NO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ or compiling without DirectX 8.

EDIT:
You can find the precompiled dll's with the mingw specified by you here. In the archive you'll find DX8 and DX9 libs (only DX9 was used and only x32 version), Code::Blocks projects and an example project using Irrlicht. I made the it before you specified the error message and probably I would have not bothered to make them if I knew the problem was only for the input system. But I'll still share them in case anyone else needs them.
Last edited by SLC on Sun Feb 09, 2014 8:13 am, edited 2 times in total.
Cyanotype
Posts: 9
Joined: Sat Feb 08, 2014 3:51 am

Re: Irrlicht.dll with DIRECT3D9

Post by Cyanotype »

Haha thanks, I am actually as we speak trying to compile with NO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ since I saw the define by accident and figured it might work. This gives me some hope that this time it might really work :)

Edit: YES! Finally, this was the solution. Thanks a lot for your help mate :)
Your post even made me smile a little I don't know how that didn't show up in my search results since it is exactly the same situation and we both tried including the old SDKs haha^^
Post Reply