Tuesday, April 19, 2011

Ogre3d in Netbeans 7

Recently me and a friend of mine started talking about creating a game using C++. After a little looking around, we decided on the OGRE game engine as the framework of choice and me being a fan of Netbeans, we choose that as IDE. Here comes a little guide to setting up an OGRE 1.7.2 project in Netbeans 7 RC using MinGW on Windows 7.

Netbeans
Install Netbeans IDE 7 RC remember to select the all inclusive or c++ versions.

MinGW
Install MinGW using the mingw-get-inst installer. For this guide we install it at the default location (C:\MinGW).

During installation you should select the C++ component, as well as the two MSYS components.

After installation you need to add C:\MinGW\bin to your system Path.

Now you should be able to load up Netbeans:
  1. Select Tools -> Options -> C/C++ Tab.
  2. Press "Add..."
  3. Now select your base directory C:\MinGW\bin (same as Path), the rest should be auto-detected.
Create a new project, choose Samples -> C/C++ -> Welcome and try to build (you should succeed).

OGRE
Install OGRE 1.7.2 SDK for MinGW the self extractor will place it self where ever you download it, but copy the extracted folder to your root (C:\OgreSDK).

Here i basically followed this Ogre guide.

Only thing i changed was:
  • Project Properties -> Build -> Linker -> Output path to "C:/OgreSDK/bin/Debug/ogregame1". Switch out ogregame1 with your name of choice.
  • Project Properties -> Run -> Console Type: External Terminal.

NOTE: OgreMain_d.dll and OIS_d.dll is in the bin/Debug directory.
NOTE2: Executar is Run in English.

Now everything builds and runs. You can test it your self, with the main.cpp file from MadMarx tutorial One.

1 comment: