[fixed] VS 2005 & Irrlicht 0.14 - Compiling

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
noone

[fixed] VS 2005 & Irrlicht 0.14 - Compiling

Post by noone »

Hi there...

The Irrlicht 0.14 SDK seems to be uncomplete. There are missing files in the Visual Studio 8.0 Project File of the Irrlicht Engine the Project File and in the Irrlicht.NET Version it is completely missing...

So I wrote the following lines for you to get the Irrlicht Engine and the Irrlicht Engine.NET compiled in Microsoft Visual Studio 2005 Express.

Code: Select all


PREVIOUS STEPS
---------------------------------

1) 
Download the MS Platform SDK
Follow the steps
http://lab.msdn.microsoft.com/express/visualc/usingpsdk/default.aspx
(Thanks to Spintz for the link)

2)
Go to : C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults 

open "corewin_express.vsprops" (XML-File) 
replace 
AdditionalDependencies="kernel32.lib" 
with 
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"

3)
Open VS and add the following libs to the LinkerOptions mscoree.lib;msvcrt.lib;msvcmrt.lib


COMPILE THE IRRLICHT ENGINE
---------------------------------

Download the corrected Project File here  and place it in the Irrlicht Folder
http://www.tucan-entertainment.com/Irrlicht8.0.vcproj
(Thanks to Duncan Mac Leod)

Now, compiling should work!

COMPILE THE IRRLICHT NET ENGINE
---------------------------------

Download the corrected Version here
http://www.the-kotti.de/sourcenet.zip
(Much thanks to Delight)

Replace all [Paramflag::Out] with [Out]

Now, compiling should work!


BUG FIX IRRLICHT NET
---------------------------------

The GetCollisionResultPosition of the .NET Version is not accessible, because the return type is wrong. So open the IRRLICHT NET Source and change the following lines:

In ISceneCollisionManager.h from this

	Core::Vector3D GetCollisionResultPosition(
		Scene::ITriangleSelector* selector,
		Core::Vector3D ellipsoidPosition,
		Core::Vector3D ellipsoidRadius, 
		Core::Vector3D ellipsoidDirectionAndSpeed,
		[PARAMFLAG::Out] Core::Triangle3D triout,
		[PARAMFLAG::Out] bool outFalling,
		float slidingSpeed,
		Core::Vector3D gravityDirectionAndSpeed);

Into this

Core::Vector3D GetCollisionResultPosition(
		Scene::ITriangleSelector* selector,
		Core::Vector3D ellipsoidPosition,
		Core::Vector3D ellipsoidRadius, 
		Core::Vector3D ellipsoidDirectionAndSpeed,
		[Out] Core::Triangle3D& triout,
		[Out] System::Boolean* outFalling,
		float slidingSpeed,
		Core::Vector3D gravityDirectionAndSpeed);

In ISceneCollisionManager.cpp from this

	Core::Vector3D ISceneCollisionManager::GetCollisionResultPosition(
		Scene::ITriangleSelector* selector,
		Core::Vector3D ellipsoidPosition,
		Core::Vector3D ellipsoidRadius, 
		Core::Vector3D ellipsoidDirectionAndSpeed,
		[PARAMFLAG::Out] Core::Triangle3D triout,
		[PARAMFLAG::Out] bool outFalling,
		float slidingSpeed,
		Core::Vector3D gravityDirectionAndSpeed)
	{
		bool outF;
		irr::core::triangle3df outTr;

		irr::core::vector3df ret = SCM->getCollisionResultPosition(
			selector ? selector->get_NativeTriangleSelector() : 0,
			irr::NativeConverter::getNativeVector(ellipsoidPosition),
			irr::NativeConverter::getNativeVector(ellipsoidRadius),
			irr::NativeConverter::getNativeVector(ellipsoidDirectionAndSpeed),
			outTr,
			outF,
			slidingSpeed,
			irr::NativeConverter::getNativeVector(gravityDirectionAndSpeed));

		triout = irr::NativeConverter::getNETTriangle(outTr);
		outFalling = outF;
		return irr::NativeConverter::getNETVector(ret);
	}

Into this

	Core::Vector3D ISceneCollisionManager::GetCollisionResultPosition(
		Scene::ITriangleSelector* selector,
		Core::Vector3D ellipsoidPosition,
		Core::Vector3D ellipsoidRadius, 
		Core::Vector3D ellipsoidDirectionAndSpeed,
		[Out] Core::Triangle3D& triout,
		[Out] System::Boolean* outFalling,
		float slidingSpeed,
		Core::Vector3D gravityDirectionAndSpeed)
	{
		bool outF;
		irr::core::triangle3df outTr;

		irr::core::vector3df ret = SCM->getCollisionResultPosition(
			selector ? selector->get_NativeTriangleSelector() : 0,
			irr::NativeConverter::getNativeVector(ellipsoidPosition),
			irr::NativeConverter::getNativeVector(ellipsoidRadius),
			irr::NativeConverter::getNativeVector(ellipsoidDirectionAndSpeed),
			outTr,
			outF,
			slidingSpeed,
			irr::NativeConverter::getNativeVector(gravityDirectionAndSpeed));

		triout = irr::NativeConverter::getNETTriangle(outTr);
		*outFalling = outF;
		return irr::NativeConverter::getNETVector(ret);
	}




Merry Christmas!
noone :)
Locked