Compiling Irrlicht.NET with VS 2005

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
entity0A
Posts: 3
Joined: Tue May 30, 2006 2:58 pm

Compiling Irrlicht.NET with VS 2005

Post by entity0A »

Is there any chance of compiling the Irrlicht.NET source with Visual Studio 2005, which uses .net 2.0 ?

When I import the project, the wizard sets a compiler flag "/clr:oldSyntax", but he stills resists to build.


This attribute [PARAMFLAG::Out] in Plane3D.h and Line3D.h ist unknown, it says:

System.Runtime.InteropServices.PARAMFLAG (Type Obsoleted)
Message: Use System.Runtime.InteropServices.ComTypes.PARAMFLAG instead.

I tried to resolve this but failed, could anybody help?
Cube3
Posts: 30
Joined: Wed Mar 15, 2006 7:42 pm
Location: http://cube3.helpmy.net

Post by Cube3 »

There are more issues than Paramflag, you can find how to resolve that in this forum, it has been discussed before.

There are more issues, the old clr syntax will not solve everything.

For example there is no default constructor in value classes, so after fixing the paramflags, it will bring up a lot of errors on linkage stage.

Here is a detailed description why:
http://msdn.microsoft.com/visualc/defau ... sguide.asp

I think Niko will have to make a decision when he is going to make the switch to VS2005. Or you have to come up with a very good porting script which can automatically transform VS2003 to VS2005. Surely you don't want to maintain both versions manually at each .NET release.
Platform 3D Engine using Irrlicht.NET
http://cube3.helpmy.net
entity0A
Posts: 3
Joined: Tue May 30, 2006 2:58 pm

Post by entity0A »

Thanks!

I added msvcmrt.lib to linker options and replaced all [Paramflag::Out] with [Out], as advised in

http://irrlicht.sourceforge.net/phpBB2/ ... flag#62135

now it compiles!
Cube3
Posts: 30
Joined: Wed Mar 15, 2006 7:42 pm
Location: http://cube3.helpmy.net

Post by Cube3 »

Care to share the solution here with us?

Would be great. thanks.
Platform 3D Engine using Irrlicht.NET
http://cube3.helpmy.net
entity0A
Posts: 3
Joined: Tue May 30, 2006 2:58 pm

Post by entity0A »

There was nothing more involved than I already said:


1. linker->additional dependencies:

"mscoree.lib msvcrt.lib msvcmrt.lib" (msvcmrt.lib added)

2. search and replace in all files

"[Paramflag::Out]" by "[Out]" (14 replacements)

3. place irrlicht.lib in

..\debug\

if its not already there.


It should work..
Locked