<h1>Arhell instalation under OS X</h1>
<h2 id="XCode">XCode</h2>
<p>Install latest XCode from App store.</p>
<h2 id="OpenCVlibrary">OpenCV library</h2>
<p>There is no need to compile it by yourself, there is a working version of OpenCV (2.3.1) in macports repository. Just install Xcode (with command line support and Unix tools) --> install macports and then install opencv by:</p>
<p>$ sudo port install opencv (it will get installed in typical macports /opt/lib directory)</p>
<h2 id="Irrlichtlibrary">Irrlicht library</h2>
<p>This is way more difficult than opencv. Go ahead and download irrlicht 1.7.2 (could not get this working under 1.7.3) from sourceforge. After that follow these instructions:</p>
<ol>
<li>Go to source in irrlicht directory</li>
<li>Open MacOSX XCode project for irrlicht</li>
<li>Now go to XCode build settings and change:
<ul>
<li>Architectures to 32/64 bit</li>
<li>Base SDK to 10.7 or whatever your Mac OS version is</li>
<li>Build for Active architecture only --> Yes</li>
<li>Valid architectures --> i386 x86_64</li>
<li>This is the IMPORTANT PART: Compiler for c/c++/objective c --> LLVM GCC 4.2 (and NOT the apple default one)</li>
</ul>
</li>
<li>There is a bug in irrlicht that prevents irrlicht.a from being built (this bug is not supposed to be in 1.8 anymore)
<ul>
<li>to fix this bug navigate to somewhere/irrlicht-1.7.2/source/Irrlicht</li>
<li>go to file : COpenGLSLMaterialRenderer.cpp and replace replace:</li>
</ul>
</li>
</ol>
<pre>
#if defined(GL_ARB_geometry_shader4) || defined(GL_EXT_geometry_shader4) || defined(GL_NV_geometry_shader4)
Driver->extGlProgramParameteri((GLuint)Program, GL_GEOMETRY_INPUT_TYPE_EXT, Driver->primitiveTypeToGL(inType));
Driver->extGlProgramParameteri((GLuint)Program, GL_GEOMETRY_OUTPUT_TYPE_EXT, Driver->primitiveTypeToGL(outType));
if (verticesOut==0)
Driver->extGlProgramParameteri((GLuint)Program, GL_GEOMETRY_VERTICES_OUT_EXT, Driver->MaxGeometryVerticesOut);
else
Driver->extGlProgramParameteri((GLuint)Program, GL_GEOMETRY_VERTICES_OUT_EXT, core::min_(verticesOut, Driver->MaxGeometryVerticesOut));
#elif defined(GL_NV_geometry_program4)
if (verticesOut==0)
Driver->extGlProgramVertexLimit(GL_GEOMETRY_PROGRAM_NV, Driver->MaxGeometryVerticesOut);
else
Driver->extGlProgramVertexLimit(GL_GEOMETRY_PROGRAM_NV, core::min_(verticesOut,
Driver->MaxGeometryVerticesOut));
#endif
</pre>
<p>with the following (more on this <a href="http://dbrgames.wordpress.com/2011/12/31/compiling-irrlicht-1-7-2-with-mac-os-10-7-and-xcode-4-1/">&nbsp;http://dbrgames.wordpress.com/2011/12/31/compiling-irrlicht-1-7-2-with-mac-os-10-7-and-xcode-4-1/</a>)</p>
<pre>
#if defined(GL_ARB_geometry_shader4) || defined(GL_EXT_geometry_shader4) || defined(GL_NV_geometry_shader4)
Driver->extGlProgramParameteri((long GLuint)Program, GL_GEOMETRY_INPUT_TYPE_EXT, Driver->primitiveTypeToGL(inType));
Driver->extGlProgramParameteri((long GLuint)Program, GL_GEOMETRY_OUTPUT_TYPE_EXT, Driver->primitiveTypeToGL(outType));
if (verticesOut==0)
Driver->extGlProgramParameteri((long GLuint)Program, GL_GEOMETRY_VERTICES_OUT_EXT, Driver->MaxGeometryVerticesOut);
else
Driver->extGlProgramParameteri((long GLuint)Program, GL_GEOMETRY_VERTICES_OUT_EXT, core::min_(verticesOut, Driver->MaxGeometryVerticesOut));
#elif defined(GL_NV_geometry_program4)
if (verticesOut==0)
Driver->extGlProgramVertexLimit(GL_GEOMETRY_PROGRAM_NV, Driver->MaxGeometryVerticesOut);
else
Driver->extGlProgramVertexLimit(GL_GEOMETRY_PROGRAM_NV, core::min_(verticesOut, Driver->MaxGeometryVerticesOut));
#endif
</pre>
<p>Now you can build irrlicht lib.</p>
<p>Finally, you need to install irrlicht headers and irrlicht static library to your MacOS X system. Do it with superuser rights (sudo su)</p>
<pre>
cp /Users/davidprochazka/Documents/irrlicht-1.7.2/include/* /usr/local/include/irrlicht/
</pre>
<pre>
cp /Users/davidprochazka/Documents/irrlicht-1.7.2/source/Irrlicht/MacOSX/build/Debug/libIrrlicht.a /usr/lib</pre>