DIRECT3D9 Driver was not compiled into this dll. Try another

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
WeaselBoy
Posts: 2
Joined: Mon Dec 08, 2008 8:57 pm

DIRECT3D9 Driver was not compiled into this dll. Try another

Post by WeaselBoy »

Warning: I am not a C++ expert, I, in fact, just finished a newb book which doesn't even cover exception throwing, let alone the horrors of library linking.

I keep getting that error every time I run the examples and select 'a' (Opengl and the software renderers work find). I looked through the source code to find the error, and it's basically just finding trouble creating the driver in CirrDeviceWin32.cpp. Here's the source, just to save you the trouble of looking for it:

Code: Select all

	case video::EDT_DIRECT3D9:
		#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_
		VideoDriver = video::createDirectX9Driver(windowSize, HWnd, bits, fullscreen,
			stencilbuffer, FileSystem, false, highPrecisionFPU, vsync, antiAlias);
		if (!VideoDriver)
		{
			os::Printer::log("Could not create DIRECT3D9 Driver.", ELL_ERROR);
		}
		#else
		os::Printer::log("DIRECT3D9 Driver was not compiled into this dll. Try another one.", ELL_ERROR);
		#endif // _IRR_COMPILE_WITH_DIRECT3D_9_

		break;
My ide is Dev-C++, my compiler is MINGW, my OS is Windows Vista Premium.

I tried downloading and installing the latest Directx sdk.

I tried linking the .lib files in Dev-C++ and recompiling the irrlicht source.

I tried linking the .lib files in Dev-C++ and recompiling one of the examples.

I tried copying the .lib files into the mingw lib directory.

I tried restarting.

It just refuses to work. And I can't seem to find anyone else with the above problem, so I'm either:

A. Extremely unfortunate

Or

B. I'm doing something extremely stupid.

I'd really appreciate any help.

P.S I'm not sure if this affects anything but the runtime I have installed is DX10 and the SDK I believe is DX11 but it does have DX9 lib files.
MasterM
Posts: 128
Joined: Sat Oct 20, 2007 2:38 am
Location: netherlands antilles, Curacao

Post by MasterM »

I think that the MINGW version of irrlicht doesnt have directx compiled in...try visual studio and see if you still get the problem...there is a directx version for MINGW in the forum somewhere if i'm not mistaking...
C++ is not the Magdalena...it takes patience...shes like the well aged prostitute, it takes years to learn her tricks! she is cruel...laughs at you when you are naked...
Life of a programmer == Const abuse
WeaselBoy
Posts: 2
Joined: Mon Dec 08, 2008 8:57 pm

Post by WeaselBoy »

Well I'll be damned, the visual studio examples work. I guess I could always download VC++ express or switch back to C#. Although I'll try and look for that directx compiled version.
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You can also compile with mingw for directx. You need a directx sdk compatible with mingw (most should do here) and enable a somewhat lengthy define in your IDE. Please search the forums or IrrCompileConfig.h for this DIRECT_X_SDK_GCC define (it's definitely called differently, but you should find it).
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

If I remember correctly what I did to compile Irrlicht with MingW on Windows XP with Dx9, what I did was adding the DX SDK (only the headers) to the source directory of the Irrlicht SDK (I called the folder IDirectX_SDK) and edited the following line in the Makefile:
From this:

Code: Select all

CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng
To this:

Code: Select all

CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng -IDirectX_SDK
Few things you should know; It seems right now like something's missing, like I did something else beside that but that's just a feeling - I might be right! Also you have to have the actual directx sdk installed right (again I think, I did it long time ago).

P.S
This is what I did few months ago and it worked, I didn't test this on the current revision of Irrlicht but it should still work..

Edit:
hybrid wrote:You can also compile with mingw for directx. You need a directx sdk compatible with mingw (most should do here) and enable a somewhat lengthy define in your IDE. Please search the forums or IrrCompileConfig.h for this DIRECT_X_SDK_GCC define (it's definitely called differently, but you should find it).
I don't think I ever did something like this (except installing the Dx SDK hehe) and it worked for me..
Last edited by MasterGod on Mon Dec 08, 2008 11:06 pm, edited 1 time in total.
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Ok, before more uncertainty comes in, the define is IRR_COMPILE_WITH_DX9_DEV_PACK
Post Reply