Project

General

Profile

Arhell instalation under OS X

XCode

Install latest XCode from App store.

OpenCV library

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:

$ sudo port install opencv (it will get installed in typical macports /opt/lib directory)

Irrlicht library

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:

  1. Go to source in irrlicht directory
  2. Open MacOSX XCode project for irrlicht
  3. Now go to XCode build settings and change:
    • Architectures to 32/64 bit
    • Base SDK to 10.7 or whatever your Mac OS version is
    • Build for Active architecture only --> Yes
    • Valid architectures --> i386 x86_64
    • This is the IMPORTANT PART: Compiler for c/c++/objective c --> LLVM GCC 4.2 (and NOT the apple default one)
  4. There is a bug in irrlicht that prevents irrlicht.a from being built (this bug is not supposed to be in 1.8 anymore)
    • to fix this bug navigate to somewhere/irrlicht-1.7.2/source/Irrlicht
    • go to file : COpenGLSLMaterialRenderer.cpp and replace replace:
#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

with the following (more on this  http://dbrgames.wordpress.com/2011/12/31/compiling-irrlicht-1-7-2-with-mac-os-10-7-and-xcode-4-1/)

#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

Now you can build irrlicht lib.

Finally, you need to install irrlicht headers and irrlicht static library to your MacOS X system. Do it with superuser rights (sudo su)

cp /Users/davidprochazka/Documents/irrlicht-1.7.2/include/* /usr/local/include/irrlicht/
cp /Users/davidprochazka/Documents/irrlicht-1.7.2/source/Irrlicht/MacOSX/build/Debug/libIrrlicht.a /usr/lib