Problem with installing Ogre sdk?
Asked Answered
N

2

5

I'm new to Ogre and tried to run the first tutorial, but I have faced a problem getting the error message

OGRE EXCEPTION(6:FileNotFoundException): 'resources_d.cfg' file not found! in
ConfigFile::load at ../../OgreMain/src/OgreConfigFile.cpp (line 83)

Please help, its critical!

Another question:

Is cmake important for installing the Ogre sdk?

Nonagenarian answered 16/8, 2011 at 0:2 Comment(1)
One of the problems I faced when trying to love ogre is their tutorials and documentation is routinely out of date. On top of that, it is never clear which version of the library they expect you to be using.Ungotten
E
6

After getting ogre compiled/installed using cmake on linux those two config files live at

/usr/local/share/OGRE/resources.cfg
/usr/local/share/OGRE/plugins.cfg

just import both into your ogre project Once ogre is installed, your project does not need cmake To get you going for the tutorials :

How to setup eclipse with ogre :

File -> New -> C++ Project -> EmptyProject

C/C++ Build -> Environment OGRE_LOC /home/scott/src/ogre_src_v1-7-3

C/C++ Build -> Settings

GCC C++ Compiler -> Includes

    ${OGRE_LOC}/OgreMain/include
    /usr/local/include/OGRE
    ${OGRE_LOC}/Samples/Common/include
    /usr/include/OIS

GCC C++ Linker -> Libraries (-l)

    OgreMain
    OgreTerrain
    OIS
    CEGUIOgreRenderer

right click project -> Properties -> Import

General -> File System -> 

    ONLY import those 4 files from the tutorial project 
           (NOT dist, build, makefiles ...)

        BaseApplication.cpp
        BaseApplication.h
        TutorialApplication.cpp
        TutorialApplication.h

    also import these files :

/usr/local/share/OGRE/resources.cfg
/usr/local/share/OGRE/plugins.cfg

Now you are ready to compile and run !

To add an Ogre model :

First do above steps to create an ogre project, assure it compiles OK. On execution it'll render a black screen - thats fine. Now to add a model (an Ogre) simply edit TutorialApplication.cpp so function createScene appears as :

``

void TutorialApplication::createScene(void) {

Ogre::Entity* ogreHead = mSceneMgr->createEntity("Head", "ogrehead.mesh");

Ogre::SceneNode* headNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
headNode->attachObject(ogreHead);

// Set ambient light
mSceneMgr->setAmbientLight(Ogre::ColourValue(0.5, 0.5, 0.5));

// Create a light
Ogre::Light* l = mSceneMgr->createLight("MainLight");
l->setPosition(20,80,50);

}

Elli answered 17/8, 2011 at 14:8 Comment(3)
thx for replay .. could you tell me how i can load any model to ogre 1.7.3Nonagenarian
I edited original answer above with How to load an Ogre modelElli
@ScottStensland Thank you so much for this answer! I had previously inched along on my own solving each problem as it came up until I reached the black screen stage, and first thought that something was wrong with my graphics card. But to find that the tutorial didn't have the code to show what I was expecting (an ogre)... well you saved me a huge headache!Cribriform
M
1

CMake is critical for building the ogre sdk from source - I would not try to configure the installation yourself. If you are using the prebuilt sdk, cmake is probably unnecessary.

As far as your error goes, it happens to be that you are trying to load resources from the resources.cfg. I am unaware of your operating system, however, be sure that your resources.cfg is in the same directory as your binary. If you are using MSVC and running it through the debugger, make sure your working directory (found in Project Properties -> Debugging -> Working Directory) is set to the directory of your executable.

Much answered 16/8, 2011 at 16:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.