Newbie to MOGRE, And the standard installation issues.

Celtic

18-04-2007 06:23:59

Hey Everyone,

I have just started with MOGRE, I was pleasently surpised to find Ogre had a .NET wrapper, dont know why but I believed this was not the case.

Now to the point, I am using...

MS VC# 2005 Express Edition with SP1 (not full, the 22mb job).

I dont know if this is relevant, but I have the MS DirectX SDK installed, and I am running on Windows XP Pro with SP2 and .NET Framework 2.0.

I installed MOGRE as follows...

1. Downloaded the MOGRE precompiled SDK from the link in the wiki.

2. Installed MOGRE to its default path of C:\OgreSDK

3. Downloaded MOGRE Sample framework, unrared and copied the debug version to OgreSDK\Bin\debug, and the same for the release version.

4. I have never fiddled with global paths before, so this could be the problem, this is exactly what I added to the end of the "Path" system variable...

C:\OgreSDK\bin\release;C:\OgreSDK\bin\debug"

5. Started a new project in VS using the "Windows Application" template and deleted the automatically generated form.

6. Added references to the Mogre.dll and MogreFramework.dll located in the OgreSDK\Bin\release directory, as per the instructions on the wiki.

7. Added a post build event command line as follows..

copy "$(TargetPath)" "C:\OgreSdk\bin\$(ConfigurationName)"

8. Set the working directory of my project to "OgreSDK\Bin\Release", I have changed this to debug instead of release and it has not effected the problem.

9. Copied the *.cfg files from OgreSDK\Bin\Release to MyApp\Bin\Debug and MyApp\Bin\Release. Edited the "resources.cfg" file so that it looks exactly as follows...


# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=C:/OgreSDK/media/packs/OgreCore.zip
# Resource locations to be added to the default path
[General]
FileSystem=C:/OgreSDK/media
FileSystem=C:/OgreSDK/media/fonts
FileSystem=C:/OgreSDK/media/materials/programs
FileSystem=C:/OgreSDK/media/materials/scripts
FileSystem=C:/OgreSDK/media/materials/textures
FileSystem=C:/OgreSDK/media/models
FileSystem=C:/OgreSDK/media/overlays
FileSystem=C:/OgreSDK/media/particle
FileSystem=C:/OgreSDK/media/gui
FileSystem=C:/OgreSDK/media/DeferredShadingMedia
Zip=C:/OgreSDK/media/packs/cubemap.zip
Zip=C:/OgreSDK/media/packs/cubemapsJS.zip
Zip=C:/OgreSDK/media/packs/dragon.zip
Zip=C:/OgreSDK/media/packs/fresneldemo.zip
Zip=C:/OgreSDK/media/packs/ogretestmap.zip
Zip=C:/OgreSDK/media/packs/skybox.zip


9. Added the appropriate using clauses and code to create and "start" an OgreWindow, as follows..

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

namespace WindowsApplication1
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
OgreWindow win = new OgreWindow();

try
{
win.Go();
}
catch (System.Runtime.InteropServices.SEHException)
{
if (OgreException.IsThrown)
MessageBox.Show(OgreException.LastException.FullDescription,
"An Ogre exception has occurred!");
else
throw;
}
}
}
}


If I run the application in debug mode through the IDE I get the following error, which I assume is because I screwed up on some paths somewhere...

OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library .\RenderSystem_Direct3D9_d. System Error: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
in DynLib::load at ..\src\OgreDynLib.cpp (line 80)


[NOTE]

The above error is displayed immediatly after build, but before anything visual is displayed.

If I copy the executable into the Release folder in the OgreSDK\Bin directory, and then execute it I get the following error...

OGRE EXCEPTION(5:ItemIdentityException): Cannot find an archive factory to deal with archive of type in ArchiveManager::load at ..\src\OgreArchiveManager.cpp (line 66)

[NOTE]

The above error is displayed after the build, and after an initial loading screen is displayed. The error occurs during load, as I am new to MOGRE I dont quiet know if I am using the correct terminology, but this error occurs at a very different place compared to the first error I pasted.

I am very excited to start learning how to use MOGRE, after spending many hours using MDX in a 2.5D capacity I would love to dive right in. I apologize in advance if I have "flooded" this post with irrelevant content, but at this stage I honestly have no idea what information I should provide. If I have left out anything, please let me know and I will reply ASAP.

Kind Regards

Celtic

[EDIT]

I forgot to add, I have read (At least I think I have) all other threads that are related to installation and initial setup of MOGRE, and attempted all of the solutions and guides that were suggested. The suggestions did fix numerous problems, but no suggestions that I have found have solved this problem.

I also forgot to add that if I copy the project executable into the debug directory and execute it, it crashes. It doesn't provide me with an ogre exception, its a C# exception. This only happens if I run the application without the IDE in debug mode, if I compile it and execute it through the IDE in debug mode the second error that I pasted is the problem!

Bekas

18-04-2007 07:16:32

Did you try to run the samples ?
Follow the instructions in this page (try both the debug and release versions) and tell us what happens.

Celtic

18-04-2007 07:29:02

Hey,

I have tried to run the samples (after following the steps in the link you posted) and they crash with a windows exception that Mogre.dll could not be loaded, and reinstalling the application could fix the problem.

This happens with both the debug version and the release version, maybe I should uninstall everything and start from scratch?

Celtic

18-04-2007 08:00:52

Ok I have just uninstalled and reinstalled everything, and I dont know what I did before but things seem to work ok.

If I run the examples in the release folder, they all work 100%

If I run the examples in the debug folder, they all crash as before.

Is this crashing normal? When I reinstalled I followed the instructions on the wiki on how to view samples to the letter, at least I am fairly sure that I did :p

Bekas

18-04-2007 08:08:35

I assume you installed vcredist_x86, right ?
vcredist only installs the vc release libraries.

Celtic

18-04-2007 11:05:04

Unfortunatly not, I installed the VS80 service pack one. But I must have done something retarded, it cant work for everyone else and magically not work for me. So I will ghost my system and format, and see what can be done!

Thanks for all your help!

Kind Regards

Celtic

Bekas

18-04-2007 11:27:40

Look in the "C:\WINDOWS\WinSxS" folder, there should be

x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_....
and
x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.762_...

If the debug one doesn't exist, then we can safely assume that the service pack for VC# express doesn't install it.

Celtic

18-04-2007 12:01:36

Just checked, and indeed the Debug CRT does not exist!

Bekas

18-04-2007 13:55:30

Try this one out:
-Go to the "C:\WINDOWS\WinSxS\Policies\x86_policy.8.0.Microsoft.VC80.DebugCRT_..." folder
-Open the "8.0.50727.42.policy" file on notepad
-There's a bindingRedirect XML tag, under it add one more
<bindingRedirect oldVersion="8.0.50727.762" newVersion="8.0.50727.42"/>
-Save it, try the debug samples and let us know if it works or not.

Celtic

19-04-2007 10:00:31

Thanks for all the help Bekas,

I am now 10000000% sorted out, everything working perfectly and I have been going through the tutorials with no errors due to anything other than my own stupidity.

MOGRE works better than I could ever have dreamed, thank you very much!

Kind Regards

Celtic

Bekas

19-04-2007 12:27:08

Nice, we finally found a workaround for the dreaded debug libraries issue :)

civilmonk

09-09-2007 17:39:43

But still problem with.... Vista :)

I had this problem on XP and Bekas solution resolved it. When I tried to do the same on Vista I found problems.

Frist was easy - there is on "policies" folder. But I found polices in "manifests" folder (there is a lot of files and you have to find one with "policy" in name).

Second was a little hard - how to change policy file in that folder - Vista doesn't allowed to do that. But I found solution - you have to take ownership on that file and after that you can add to your user rights to change that file.

So finally I had change it ... but it doesn't work. Still the same problem when I tried to run debug versions of samples.

Somebody resolved that on Vista?

Greetings
CM

SciasXIII

03-10-2007 20:30:04

Hi,

I'm having the same problem as well.
But what do you do if the DebugCRT folder isnt there?
I installed SP1 for VC# Express and also installed vcredist.exe as well...
Im at a loss as to what is the problem.

Rhynedahll

28-01-2008 23:08:39

Hi,

I'm having the same problem as well.
But what do you do if the DebugCRT folder isnt there?
I installed SP1 for VC# Express and also installed vcredist.exe as well...
Im at a loss as to what is the problem.


Ditto for me.

Any suggestions?

butters

27-02-2008 21:13:50

Somebody resolved that on Vista?
I'm using Win2008RC1x64. I followed the wiki Mogre_Basic_Tutorial_0

Then in VS2008, i went to Build->Configuration Manager.
Then for the Active solution configuration Debug, I created two new Active solution platforms.
Click the Active solution platforms select box and select <New>.
Create one for x64 and x86. MORGRE does not seem to support x64 right now. But compiling/running under the x86 profile as opposed to the Any CPU or x64 worked for me.

fuzzychaos

05-04-2008 13:38:33

Did anyone manage to figure out the DebugCRT problem. I also have the same issue running the Debug programs from Visual C# 2008 Express Edition. The Release mode ones work okay.

raygeee

05-04-2008 16:53:06

Somewhere in the forum I read that it might help copying 3 VS2005 debug-dlls and a manifest-file into your working folder. That's all Mogre needs to run in debug mode. Someone with VS2005 installed then could provide the files. But I don't know which files they are.

fuzzychaos

05-04-2008 17:00:34

Ok, thanks, I have VS.NET 2003 and it all works with the Ogre SDK. For now I have to just keep running VC# 2008 EE in Release mode as I work though all of the tutorials :shock:

Technolithic

01-08-2008 15:32:32

I'm running Vista with VS2008 Express and I'm having a heck of a time figuring this out. I'm getting this in the MS Management Console:

Activation context generation failed for "C:\Users\ash\Desktop\BasicMOGRESetup\bin\Debug\Mogre.dll". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.

The same exact runtime error Sayuri posted is what I'm getting. (line 80 and all)

Any suggestions?

tonyhnz

04-08-2008 18:39:24


Try this one out:
-Go to the "C:\WINDOWS\WinSxS\Policies\x86_policy.8.0.Microsoft.VC80.DebugCRT_..." folder
-Open the "8.0.50727.42.policy" file on notepad
-There's a bindingRedirect XML tag, under it add one more
Code:
<bindingRedirect oldVersion="8.0.50727.762" newVersion="8.0.50727.42"/>

-Save it, try the debug samples and let us know if it works or not.


I had tried the above as I was missing the 762 debugcrt but still have the problem with not being able to run in debug mode.

*Resolved * I had installed visual C# express 2008 but not visual C++ express 2008. After installing C++ Express 2008 it started working.