Getting error on Mogre Basic Tutorial1

glab

02-11-2008 14:54:42

Hi guys, this is my first post here and am a newbie in MOGRE and OGRE and VS. Am having an error when i am trying to debug the "Mogre Basic Tutorial1" from the ogre wiki. The error is :

"An Ogre exception has occured

OGRE EXCEPTION(6:FileNotFoundException):'resources.cfg' files not found! in ConfigFile::load at
d:\cubicalminds\mogreworld\mogre\ogrenew\ogremain\src\ogreconfigfile.cpp(line84)"


I dunno why its is searching in that path even that i don't have any folder called cubicalminds in my D drive. MOGRE and OGRE and VS2008 are all in drive C.

The code that i have pasted inside VS in the program.cs is:

using System;
using System.Collections.Generic;
using System.Windows.Forms;
using MogreFramework;
using Mogre;

namespace Tutorial01
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
try
{
OgreWindow win = new OgreWindow();
new SceneCreator(win);
win.Go();
}
catch (System.Runtime.InteropServices.SEHException)
{
if (OgreException.IsThrown)
MessageBox.Show(OgreException.LastException.FullDescription, "An Ogre exception has occurred!");
else
throw;
}
}
}

class SceneCreator
{
public SceneCreator(OgreWindow win)
{
win.SceneCreating += new OgreWindow.SceneEventHandler(SceneCreating);
}

void SceneCreating(OgreWindow win)
{
}
}
}


I have already added the references Mogre.dll and MogreFrameWork.dll.

I need help please. Thanks in advance

glab

02-11-2008 17:28:15

I think i solved the problem ... but now its giving me another error on the "win.go()" :

AccessViolationException

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.


NB: Am using VS2008 on Windows Vista

Beauty

02-11-2008 21:21:46

Did you read tutorial 0?
There is written how to setup a Mogre application.
The entries of default resources.cfg often has to be changed.
www.ogre3d.org/wiki/index.php/Mogre_Basic_Tutorial_0 ... C#
www.ogre3d.org/wiki/index.php/Mogre_Basic_Tutorial_VB_0 ... Visual Basic

OGRE EXCEPTION ... d:\cubicalminds
"Cubicalminds" is the company of user Marioko. He created the current MogreSDK. The path is related to the sources at compilation time.

glab

03-11-2008 01:03:12

yes i changed all the pathes in the resources.cfg and completed everything asked in tutorial0.

the script given in tutorial0 worked just fine also. and now am working in tutorial 2 but adding everything to the main project that i created on tutorial0 because its compiling.

but the problem is when i created a new project and added the script written in tutorial1. i copied all the .cfg file to my project directory and add the references. but i dont understand why is that happening.

i need to create new projects, i can't keep on working based on the project of tutorial0. Please help.

Beauty

03-11-2008 02:28:38

I remember. I also had this problems when I tried to put several tutorial codes into one project. It's better to create a new project. Also I had a problem, that I found out by looking tutorial 0 again. (Maybe I forgot to link Mogre.dll)

If the paths in ressources.cfg are relative then they must relative to the path of the .exe file (in the bin/debug or bin/release directory).

The file Plugins.cfg and the .dll files (like RenderSystem_Direct3D9.dll) I have in the bin/debug directory.
In the file the current directory is set:
# Define plugin folder
PluginFolder=.


Sorry, more I can't help you now.
I use WinXP and VS 2005. I don't know if there can be a problem.
With VS 2008 it should run (I suppose). The current MogreSDK was compiled by VS 2008.