I can't run Mogre

toghian

03-09-2009 09:54:26

Hi

I wanted to start Mogre,but it's almost a week that I havn't been able to run it. I followed instruction step by step for several times but in the best situation that i got fewer exception i came up with below exception:

Could not load file or assembly 'Mogre, Version=1.4.8.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)


System.IO.FileLoadException was unhandled
Message="Could not load file or assembly 'Mogre, Version=1.4.8.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)"
Source="firstMogre"
FileName="Mogre, Version=1.4.8.0, Culture=neutral, PublicKeyToken=null"
FusionLog=""
StackTrace:
at firstMogre.Program.Main()
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

I copied Mogre.dll and Mogreframwork.dll in my Debug folder in addition to setting the WorkingDirectory of my projet to "myProjectFolder/bin/Debug" and changed the *.cfg files
furthermore the default Environmental Variable for OGRE_HOME was C:\MogreSDK and i changed it to C:\MogreSDK\bin\Debug or C:\MogreSDK\bin\release temporarily but unfortunately the problem didn't solve

thanks in advance

TeaBag

03-09-2009 13:42:00

Hi,

have you forgot to copy the OgreMain.dll or the OgreMain_d.dll depending of Build configuration (Debug or Release) to your working folder?

toghian

03-09-2009 14:11:31

Hi

I copied them but I still have the same problem :cry:

TeaBag

03-09-2009 14:19:42

Hmm, you added the reference to the Mogre DLL before or after copying the files?

Also, you can try to remove the reference to Mogre in your project and add it again (this time add the Mogre.dll in your working folder).

After that make sure you clean your project and then build it.

Do you have the latest DirectX redist (although the problems that could occur from not having it should come a little later, while trying to load the RenderSystem)?

mcaden

03-09-2009 16:14:56

At a glance I'd say you haven't updated the directX redist. Do a search for dxwebsetup and it'll update you fully.

Additionally you can check ogre.log if it has been created at all to further nail it down.

toghian

04-09-2009 06:57:58

Thanks to everybody trying to help me

I just copied OgreMain.dll and OgreMain_d.dll ,additionaly I refrenced More.dll and MogreFramework.dll again but didn't pay off

for the directX i use DirectX Redistributables from November 2007, but I think at this point it's not the main matter although if you recommend i'll upgrade it

Is there any problem with my VS because i'm using VC# 2005?

TeaBag

04-09-2009 07:09:40

probably not... are you able to compile and run the samples?

smiley80

04-09-2009 07:12:28

You need at least the March 2008 DirectX release, if you want to use the DirectX rendersystem.
And you need the Visual C++ 2008 Redistributable Package.

toghian

05-09-2009 07:55:08

Hi
I cant run Examples :(

TeaBag

05-09-2009 08:01:44

and do you get any kind of error?

what about the ogre.log? does it say something that could lead you to the cause of the error? Can you post here the contents of the ogre.log file (from the examples)

Did you tried to update your DirectX?
and install the Visual C++ 2008 Redistributable Package as smiley80 suggested?

psycloneDBA

09-09-2009 03:50:00

This looks like you are missing the *.cfg files

e.g.
resource.cfg
etc...


I had the same issue initially.

Psyclone

toghian

10-09-2009 09:02:34

Hi friends

After I tried every solution you suggested and got no payoff, I want to explain my steps to run Mogre.Maybe I made a mistake and you can halp me:

1- install mogre in drive C:
2- edit "enviromental Variables" and add to "OGRE_HOME" these new entries "";C:\MogreSDK\bin\release;C:\MogreSDK\bin\debug"
2.5 :D - copy MogreFramework.dll to C:\MogreSDK\bin\debug and release
3- create new project and refrence to Mogre.dll and MogreFramework.dll
4- copy ogreMain.dll and ogremain_d.dll in myProjectPath/bin/debug
5- copy *.cfg files in my Debug folder and change some paths
6- change the myProject->Properties->Build->workingDirectory to myProjectPath/bin/debug

Additionally I changed my VC# to VS2005 and installed Directx 2009 and vcredist_x86.exe

Unfortunatelly the same problem still comes up.

TeaBag

10-09-2009 09:21:08

Hi,

I was checking my config based on what you said and to be honest... I have 2 environment variables related to OGRE but I believe that those are only used by my projects made with OGRE, not Mogre...

nonetheless, I have:
OGRE_HOME = C:\OgreSDK
OGRE_SDK = C:\OgreSDK\bin

Do you get any error besides the ones you mentioned?
What about the Ogre.log file? Is it created? Does it have any error there? Can you post it here (use the Code tag)?

toghian

10-09-2009 15:32:19

Hi

I searched my whole computer for "ogre.log" but I didn't find any
Where can I find it?

for the error,it is just the one appearing when I run my project.
additionaly I added OGRE_SDK = C:\OgreSDK\bin to my Enviromenratl Variables but didn't worked

TeaBag

10-09-2009 15:46:10

ok, ogre.log wasn't created yet (as I thought). If created it will usually appear in the same folder where you placed your config files and your executables.

I'm getting out of ideas... can you please try to compile the samples (and your project) in Release mode and try to run it (try to run it inside and outside your IDE)?

Hank

11-09-2009 03:46:30

Have you verified that your application is building for x86 and not for any processor or x64? Mogre requires that you build for x86

toghian

08-10-2009 09:38:09

Hi

Finally I upgraded my IDE to VS2008 and I could run mogre for the first time

TeaBag

08-10-2009 09:40:55

I'm glad that fixed your problem but still.... strange strange problem what you had.

Enjoy Mogre :D
Best,
Luís