Project

General

Profile

OSG Building and Debugging Gotchas

Eclipse and plugins
For NSOSG development, Eclipse version Helios or better is highly recommended. The following plugins should be installed.

Koneki Lua: http://www.eclipse.org/koneki/ldt/. (LuaEclipse has problems on more recent versions of Eclipse).
Eclipse CMake Editor: http://cmakeed.sourceforge.net/updates/.
Eclipse GLSL Editor (manual install): http://sourceforge.net/projects/glshaders/.

Also install “Eclipse XML Editor and Tools” from the Helios update repository. Since CEGUI XML files don’t have an XML extension, you’ll need to register the following files extensions as XML under “Window→Preferences→General→Editors→File Associations.” (.scheme, .imageset, .layout, .looknfeel, .font). Then click the 'Content Types’ link on the same property page and create the same associations.

OSG Debug Builds
First, ensure that CMAKE_BUILD_TYPE is set to 'Debug’ in the cmake-gui settings for the OSG project and then Generate the makefiles. Perform the build and install. For debug builds, a 'd’ will be appended to the library name so both release and debug builds of the OSG libraries can coexist on the system. Follow the same process for the Nightshade-12 build. When set to debug, it will automatically link to the debug OSG libs so they must already exist on the system.

Finally, Eclipse needs to know where the OSG source files are for step debugging. This can be set in the project’s debug configuration settings (the Source tab).

CEGUI Builds (General)
The following options should be passed to CEGUI’s configure script.

./configure --disable-python-module --enable-null-renderer

When configure completes, CEGUI will list the enabled modules. Verify the following options match.
* Renderer Modules:
*         Building OpenGL Renderer:                     yes
*             Using external GLEW library:              no
*         Building Ogre Renderer:                       no
*         Building Irrlicht Renderer:                   no
*         Building DirectFB Renderer:                   no
*         Building Null Renderer:                       yes

* Scripting:
*         Building Lua scripting module:                yes
*             Safety checks enabled:                    no
*         Building tolua++cegui generator:              no
*             Using external tolua++ library:           yes
*
*         Building Python extension module(s):          no

CEGUI Builds (OSX Specific)
CEGUI 0.7.5 has a little trouble building out of the box. A couple include files need to be added. First, edit CEGUIDynamicModule.h and add the following at the top of the OSX/Mac#ifdef block.

#include <CoreFoundation/CFBundle.h>

Then edit CEGUIDynamicModule.cpp and change #include “macPlugin.h” to the following.
#include "implementations/mac/macPlugin.h" 

GCC4.7 error

#include <unistd.h>

This needs to be added to ThreadingUtils.cpp and FileSystemCache.cpp