Page 2 of 2

Posted: Tue Jun 07, 2005 4:32 pm
by WalterWzK
Well im not that good with C++ but ive tried to compile the source-code of the engine without any change's to it and I cant get it to work.

Is it because I use C++ .NET Express to compile or are there more ppl that cant compile the unchanged source-code that came with the SDK?

Posted: Fri Jun 10, 2005 11:50 pm
by Brinsky
The source code is nicely written and understandable ones you manage to understand its root.. also i don't know what kind of errors you keep getting so i can't be much of a help here. nevertheless the saying goes 'where's the will there's a way'. i advise you stick to it if you're determined to compile the sc yourself.

Posted: Thu Jun 23, 2005 11:17 am
by Tufty
Well, that kind of worked. At least now I can compile my Irrlicht stuff under VS2005 B2 - or at least the examples, which didn't work before.

Workaround without recompilation

Posted: Sun Jul 24, 2005 11:36 pm
by Marky
Hi there!

A workaround without the need of recompiling the engine and probably only having DirectX 9 afterwards is:

Use createDeviceEx instead of createDevice. Works on my Visual Studio 2005 Beta 2, tested with MeshViewer and Orthogonal samples using Irrlicht 0.11. But don't ask me why one works and the other doesn't ;-). Very strange linking bug with the original library indeed.

HTH, Markus[/b]

Posted: Tue Aug 02, 2005 5:45 pm
by sRc
It's a problem with the 2005 linker, not with Irrlicht. I spent a good portion of yesterday experimenting with this.

As Marky said, createDeviceEx will work instead. Heres the quick and dirty code I made up for it, modified from the W32Window Example (I have it set to a static 800x600 in a window, because thats what I was working with )

Code: Select all

	
int irrlichtWindowX = 0;
	int irrlichtWindowY = 0;
	int irrlichtWindowWidth = 800;
	int irrlichtWindowHeight = 600;

	irr::s32  hIrrlichtWindow = ("WINDOW", "", 0, 
			irrlichtWindowX, irrlichtWindowY, irrlichtWindowWidth, irrlichtWindowHeight, 0, 
			NULL, 0, NULL);

	irr::SIrrlichtCreationParameters param;
	param.WindowId = (hIrrlichtWindow); // hColorButton
	param.DriverType = video::EDT_DIRECTX9;

	irr::IrrlichtDevice* device = irr::createDeviceEx(param);

//      And we comment out the broken createDevice for the 2005 linker
//	IrrlichtDevice *device =
//		createDevice(EDT_DIRECTX9, dimension2d<s32>(640, 480), 16, false, false, false, 0);
Alternatively, I also installed Code::Blocks and the Microsoft Visual C++ 2003 Toolkit, and it was able to build with createDevice with no problems.

Theoretically, there may be an option in 2005 beta2 to change to the 03 toolkit compiler (Microsoft usually puts an option in Visual Studio to use an alternate/updated version of the microsoft compiler, like 2003 Toolkit )