Linking problems with 0.10.0

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
WalterWzK
Posts: 72
Joined: Wed Jan 12, 2005 2:57 pm
Location: Netherlands
Contact:

Post 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?
Current Project: Don Salvatore's Mafia
Genre: 3D Shooter \ RTS
Programming Language: VB .NET
Engine: Irrlicht 11 [.NET Wrapper]
Brinsky
Posts: 28
Joined: Sun May 08, 2005 3:05 pm
Location: Slovenia

Post 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.
10 I lovez my computer
20 goto 10
Tufty

Post 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.
Marky

Workaround without recompilation

Post 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]
sRc
Posts: 431
Joined: Thu Jul 28, 2005 1:44 am
Location: Salt Lake City, Utah
Contact:

Post 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 )
Post Reply