OGRE (Object-Oriented Graphics Rendering Engine)
Setting up the compiler settings
You only need to perform this step for the Visual C++ build, using gcc the values are derived for you from the makefile listed previously.
If you are setting up you application the EASY WAY (i.e. in a subdirectory of Samples), then here's how you set up the compiler / linker settings from the Project | Settings menu item. All of these are for the Debug configuration, to set up the Release configuration just change the directories from '\Debug\' to '\Release\'.
Debug : General : Executable | = | ..\..\Common\Bin\Debug\[appname].exe |
Debug : General : Working Directory | = | ..\Common\Bin\Debug |
C++ : Preprocessor : Additional Include Directories | = | ..\Common\Include ..\..\OgreMain\include |
C++ : Preprocessor :
Preprocessor Definitions |
+= |
_STLP_DEBUG (only in debug
mode) |
C++ : Code Generation : Use runtime library | = | Debug Multithreaded DLL |
Link : General : Output File | = | ..\Common\Bin\Debug\[appname].exe |
Link : Input: Additional Library Path | = | ..\..\OgreMain\Lib\Debug |
Link : Input : Object/library Modules | += | OgreMain.lib |
Debug : Working Directory | = | ..\Common\Bin\Debug |
C/C++ : Additional Include Directories | = | ..\Common\Include |
C/C++ : Preprocessor :
Preprocessor Definitions |
+= |
_STLP_DEBUG (only in Debug
mode) |
C/C++ : Code Generation : Use runtime library | = | Debug Multithreaded DLL |
Linker : Output File | = | ..\Common\Bin\Debug\APPNAME.EXE |
Linker : Additional Library Directories | = | ..\..\OgreMain\Lib\Debug |
Linker : Additional Dependencies | += | OgreMain.lib |
Gnu Compiler Collection (gcc) v3.x
Before you start, make sure you are using gcc 3.x. Many Linux distributions still come with gcc 2.95.x which does not have as good support for the ISO C++ standard and will probably cause you problems. Please install the latest stable version of gcc 3.x.
Create a file called 'Makefile' in your application folder, with the contents:include [ogre_location]/platform-settings
all:
$(CXX) $(DEFINES) $(CFLAGS) -o [appname] [yourSampleApp].cpp $(INCDIRS) -I$(TOPDIR)/Samples/Common/include -L$(TOPDIR)/OgreMain/lib -lOgreMain
clean:
rm -f [appname]
Obviously you need to replace [ogre_location], [appname] and [yourSampleApp] with the appropriate values.
Back to Index | << Previous section |