I've finally got it to build after many attempts. They've been documented unceremoniously forever in the threads below:
1st attempts:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=11562
2nd attempts:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=15042
Drum roll please...and here are the 8 steps (updated to irrlicht v1.2 release):
1. Add "WIN64" to Preprocessor Definitions (and remove "WIN32") from the "C/C++"->"Preprocessor" on the project property page:
2. Two paths -- take "a" if you don't want DX8.1 support or take "b" if you want DX8.1 support but no shaders or reduced shader functionality:
a) Comment out the following line in "D:\Irrlicht\include\IrrCompileConfig.h" ("D" is where I extracted irrlicht to) which will disable Direct3D 8 support in irrlicht:
//#define _IRR_COMPILE_WITH_DIRECT3D_8_
b) Make changes to the following files:
i. source\Irrlicht_64\CD3D8Driver.h -- change "WIN32_LEAN_AND_MEAN" to "WIN64_LEAN_AND_MEAN"
ii. source\Irrlicht_64\CD3D8ShaderMaterialRenderer.cpp -- comment out the following lines:
D3DXAssembleShader(pxsh, strlen(pxsh), 0, 0, &code, &errors);
D3DXAssembleShader(vtxsh, strlen(vtxsh), 0, 0, &code, &errors);
iii. source\Irrlicht_64\CD3D8Texture.cpp -- change the following line from
#ifndef _IRR_USE_D3DXFilterTexture_
to
#ifdef _IRR_USE_D3DXFilterTexture_
which removes the "n" in "#ifndef."
3. Comment out the following line in "D:\Irrlicht\include\IUnknown.h":
//_IRR_DEBUG_BREAK_IF(ReferenceCounter <= 0) // someone is doing bad reference counting.
4. Comment out the following line in "D:\Irrlicht\include\irrArray.h" (this may cause problems during runtime):
//_IRR_DEBUG_BREAK_IF(index>=used) // access violation
5. Comment out the following line in "D:\Irrlicht\include\irrString.h" (this may cause problems during runtime):
//_IRR_DEBUG_BREAK_IF(index>=used) // bad index
6. Remove the following from the Additional options under the "Linker"->"Command Line" in the project property page:
/MACHINE:I386
result:
0 errors 109 warnings
Finally, here's an excerpt from the build log:
Code: Select all
Linking...
LINK : ..\..\bin\Win64-visualstudio\Irrlicht.dll not found or not built by the last incremental link; performing full link
Irrlicht.obj : warning LNK4224: /COMMENT is no longer supported; ignored
Creating library ..\..\lib\Win64-visualstudio\Irrlicht.lib and object ..\..\lib\Win64-visualstudio\Irrlicht.exp
How to build Irrlicht .NET for Windows x64 in 4 steps (updated to irrlicht v1.2 release):
1. perform either of the following in "Linker->Input->Additional Dependencies" in your project property:
a. for x64 debug build:
i. change "msvcrt.lib" to "msvcrtd.lib" (added a "d" for debug).
ii. add "msvcmrtd.lib" ("d" version)
b. for x64 release build:
i. change "msvcrtd.lib" to "msvcrt.lib" (removed the "d").
ii. add "msvcmrt.lib" (no "d" version)
2. perform a search and replace on project for "[Paramflag::Out]" and replace with "[Out]". This should touch the following files (14 places total):
\source\Irrlicht.NET\ISceneCollisionManager.cpp (4 places)
\source\Irrlicht.NET\ISceneCollisionManager.h (4 places)
\source\Irrlicht.NET\Line3D.h (1 places)
\source\Irrlicht.NET\Plane3D.h (5 places)
3. peform either of the following:
a. for x64 debug build:
i. create a folder called "debug" in the "\source" folder.
ii. copy over the "Irrlicht.lib" debug build from "lib\Win64-visualstudio" (you should have this built already if you follow the non-.NET build steps at the top of this post) to the folder created in step ii.
b. for x64 release build:
i. add the following (this is the path to your non-.NET x64 library release build) to the "Linker->Input->Additional Dependencies" in your project property (note the "Release" folder is something I made for my builds; the folder does not exist with the official irrlicht distribution):
D:\irrlicht\lib\Win64-visualStudio\Release\Irrlicht.lib
4. build and you should have a .NET version (debug or release depending on which path you took) of Irrlicht without any errors or warnings.
Update:
Thanks to hgc (see 2 posts below this one), OpenGL and DX8.1 are now functional in Windows x64. I've updated the instruction to include DX8.1 or not and include OpenGL or not.
I would recommend downloading the latest DX SDK (currently october 2006 as of this post):
http://msdn.microsoft.com/directx/sdk/
and latest Platform SDK:
for vista:
http://www.microsoft.com/downloads/deta ... laylang=en
or
http://www.microsoft.com/downloads/deta ... laylang=en
for other windows os:
http://www.microsoft.com/downloads/deta ... laylang=en
Update 2 (Dec 01 2006):
Removed steps 3 and 6 since hgc's fix appears to have made it into the v1.2 release.
Changed the warnings from 93 to 109.
Update 3 (Dec 01 2006):
Added steps to build release/debug build of irrlicht x64 .NET. Most of the info was pulled from my post here:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=14615
I thought it would be convenient to put them in one thread.