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.

- Visual C++ 6
- Visual C++.Net

  Microsoft Visual C++ 6 (SP3+)

  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

  If you want to do it the ADVANCED way, you'll have to replace the relative paths here with the actual path to the root OGRE folder.

  Microsoft Visual C++.Net

  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 after right-clicking on the project and selecting 'Properties'. All of these are for the Debug configuration, to set up the Release configuration just change the directories from '\Debug\' to '\Release\'.

  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

  If you want to do it the ADVANCED way, you'll have to replace the relative paths here with the actual path to the root OGRE folder.

  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 |