130 likes | 212 Views
Using External Libraries. With game industry standard IDE MS Visual Studio. Environment Variables. Control Panel->System->Advanced->Environment Variables->User variables->New: Variable name: OGRE_HOME Variable value: E:OGREOgreSDK_1.4.5_VS2003
E N D
Using External Libraries With game industry standard IDE MS Visual Studio
Environment Variables • Control Panel->System->Advanced->Environment Variables->User variables->New: • Variable name: OGRE_HOME • Variable value: E:\OGRE\OgreSDK_1.4.5_VS2003 • Variable value will be different on your machine
Environment Variables • Eg. {variable name, variable value}: • {OGRE_HOME, E:\OGRE\OgreSDK_1.4.5_VS2003} • {IRRLICHT_HOME, E:\irrlicht-1.3} • {NEWTON_HOME, E:\NewtonSDK} • {FMOD_HOME, E:\FMOD\FMOD_Ex_API} • {IRRNEWT_HOME, E:\IrrNewt_SDK_0_4} • {OGRENEWT_HOME, E:\OGRE_Newt\OgreNewt_Main}
Include and library files • When Visual Studio starts, go to Tools->Options->Projects->VC++ Directories
Include files • Show directories for: Include files • Add the following: • $(OGRE_HOME)\samples\refapp\include • $(OGRE_HOME)\samples\include • $(OGRE_HOME)\include • $(NEWTON_HOME)\sdk\ • $(OGRENEWT_HOME)\inc • $(IRRLICHT_HOME)\include • $(IRRNEWT_HOME)\include\ • $(FMOD_HOME)\api\inc
Library files • When Visual Studio starts, go to Tools->Options->Projects->VC++ Directories
Library files • Show directories for: Library files • Add the following: • $(OGRE_HOME)\lib • $(NEWTON_HOME)\sdk\dll • $(OGRENEWT_HOME)\lib\debug • $(IRRLICHT_HOME)\lib\Win32-visualstudio • $(IRRNEWT_HOME)\lib\win32-vc++6 • $(FMOD_HOME)\api\lib
Additional Dependencies After you create a project go to Project->Properties->Linker->Input->Additional Dependencies
Additional Dependencies • Depending on how much of the engine you are using you may not need to list all the following .lib files, it’s a complete list: • Ogre: CEGUIBase_d.lib, ode.lib, OgreGUIRenderer_d.lib, OgreMain_d.lib, OIS_d.lib, ReferenceAppLayer_d.lib • Irrlicht: irrlicht.lib • Newton: newton.lib • IrrNewt: irrnewt.lib • OgreNewt: OgreNewt_Main_d.lib • FMOD: fmodex_vc.lib
Executable files • You need to copy the following .dll files to the directory where your .exe is (your application may not need all, this is a complete list): • Ogre: CEGUIBase_d.dll, CEGUIExpatParser_d.dll, CEGUIFalagardWRBase_d.dll, cg.dll, OgreGUIRenderer_d.dll, OgreMain_d.dll, OIS_d.dll, Plugin_BSPSceneManager_d.dll, Plugin_CgProgramManager_d.dll, Plugin_OctreeSceneManager_d.dll, Plugin_ParticleFX_d.dll, ReferenceAppLayer_d.dll, RenderSystem_Direct3D9_d.dll, RenderSystem_GL_d.dll • Newton: Newton.dll • FMOD: fmodex.dll
Executable files • You define where your .exe file will be built: • Properties->Linker->General->Output File
Ogre specific • By default Ogre .exe will look for media.cfg, ogre.cfg, plugins.cfg, resources.cfg and the ../../media directory and its subdirectories. For now it will be easier if you put your executable under: • $(OGRE_HOME)\bin\debug • For your final game you can change the .cfg files and get rid of stuff you don’t use, only copy the assets that you need from the media directory, and create your .exe wherever you want.
Ask us • If you need help for anything: • cs134tas@cs.brown.edu