OGRE (Object-Oriented Graphics Rendering Engine)
Setting up the compiler
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 | = | ..\..\OgreMain\Include |
C++ : Preprocessor : Additional Include Directories | = |
..\Common\Include |
Link : General : Output File | = | ..\Common\Bin\Debug\[appname].exe |
Link : Input: Additional Library Path | = | ..\..\OgreMain\Lib\Debug |
Link : Input : Object/library Modules | += | OgreMain.lib |
Link : Input: Ignore Libraries | = | LIBCMT |
Debug : Working Directory | = | ..\Common\Bin\Debug |
C/C++ : Additional Include Directories | = | ..\..\OgreMain\Include |
C/C++ : Additional Include Directories | = | ..\Common\Include |
Linker : Output File | = | ..\Common\Bin\Debug\APPNAME.EXE |
Linker : Additional Library Directories | = | ..\..\OgreMain\Lib\Debug |
Linker : Input: Ignore Libraries | = | LIBCMT |
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.
Don't forget to edit the resources.cfg file and change the media directory to the one used by your project.
That's it. If you have any questions, post them in the Forums!
Back to Index | << Previous section | Next section >> |