Newbie problems - setting up application

Thomas233

03-05-2009 19:28:07

Hello,

first i would like to say that i am very impressed about the further development Mogre has made. What i need is a free modern 3d engine for .NET with a large community behind and i think i have found it in Mogre after comparing a lot of 3d engines like Irrlicht and so on (of course there are not many ports or wrappers for .NET beside Axiom and Irrlicht.NET). I`ve looked for

However i think setting up the first Mogre application is a bit tricky because the articles in the Wiki are partially outdated and do things in a differenty way.

What i want is to set up a clean Mogre application (debug) only using the essentials needed. I don`t need any resources or media yet and i also don`t want to use an example framework or something like that. I just want to use some basic parts of Mogre in my class library for now.

Ok so here are the steps i performed to set up my application (based on "Basic Tutorial 1" and "Installing Mogre"):
1) downloaded the Mogre SDK version 1.4.8 from your website and installed it
2) created an empty solution in Visual Studio Express 2008 SP1 and added a windows application project and a class library project to it (the class library project uses mogre and is used by the windows application project)
3) copied all dlls and cfgs from sdk\bin\debug direcotry to my output debug directory (windows application project)
4) removed any content from resources.cfg and media.cfg (but not from plugin.cfg)
5) referenced debug-version of Mogre.dll in both projects

When i run my application i get the following error when Mogre is used in anyone of those projects:
The file or assembly could not be found "Mogre, Version=1.4.8.0, Culture=neutral, PublicKeyToken=null" (Interop-Exception HRESULT: 0x800736B1)

If i copy over the 1.6.2 binaries and reference the Mogre_d.dll i get the same error.

Of course i have installed the latest DirectX and Visual C++ redistributables.

My System:
Windows XP SP 3
Visual C# 2008 Express SP1
Visual C# 2005 Express SP1
Visual C++ Redist 2005 SP1
Visual C++ Redist 2008 SP1
DirectX 9 Redist (March 2009)

Does anyone have an idea why i get those exception ? I really want to start developing my game with Mogre and would be very happy about your help !

PS: I`m sorry if this question was already asked or i`ve oversight something in the wiki, i`m really new in using a wrapper like Mogre !

Greetings,
Thomas

AndroidAdam

03-05-2009 19:48:19

do you wrap your initialize code in the main function in a try/catch?

If not use this catch statement and it should give you a more in depth error message.
catch (System.Runtime.InteropServices.SEHException)
{
if (OgreException.IsThrown)
MessageBox.Show(OgreException.LastException.FullDescription,
"An Ogre exception has occurred!");
else
throw;
}

You removed all the media paths in your resources.cfg? I had the same problem error message doing the same thing (removing the media paths) and what I noticed is that I forgot to remove a line in resources .cfg at the top it says:

# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=../../Media/packs/OgreCore.zip

I had forgotten to remove the OgreCore.zip

try that try/catch thing and tell us what error you get.

smiley80

03-05-2009 19:59:34


3) copied all dlls and cfgs from sdk\bin\debug direcotry to my output debug directory (windows application project)

Those require the debug Visual C++ libraries, which you only get if you install VS / VS C++ Express.
So either do that or use the release dlls.

Thomas233

03-05-2009 23:13:09

Hi,

thanks for your fast replies.

do you wrap your initialize code in the main function in a try/catch?

Yes i do (i am using the same try/catch block as yours). But if i step through my application those try/catch is never reached :-/

I think my resources config is correct. It looks like this:
# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]

# Resource locations to be added to the default path
[General]


Those require the debug Visual C++ libraries, which you only get if you install VS / VS C++ Express.
So either do that or use the release dlls.


If you mean Visual Studio 2005 / 2008 Express, they are both installed (both SP1). I`ve also installed the Redistributable Packages manually. If that may be the problem does anyone know how i can reinstall the original packages delivered by VS ?

Greetings,
Thomas

smiley80

03-05-2009 23:19:17

You also need Visual Studio C++ Express. The debug dlls aren't part of the Redistributable.

Does it work if you use Mogre's release dlls?

AndroidAdam

04-05-2009 02:37:16

You might want to try having some media, just until you get a program to actually run.

Thomas233

04-05-2009 23:04:47

Ok, thanks for your tipps, i`ll try it tomorrow and report progress here :-)

Greetings,
Thomas

Thomas233

05-05-2009 17:15:44

Great guys, now after i`ve installed Visual C++ 2008 SP1 Express, it runs. It were the debug dlls of VC as you said. I didn`t know that they are also needed for a wrapper.

Thank you very much for your fast and accurate help !

Greetings,
Thomas

smiley80

05-05-2009 20:31:18

I didn`t know that they are also needed for a wrapper.


To be clear:
They are not needed for Mogre's release config dlls, only for the debug ones.