Mogre inside another Dll

Sigvald

01-03-2012 09:07:24

Hey !

I have to program a Dll which will use Mogre. For the moment, I'm trying to do the same thing than in the Tutorial Framework: launching the Ogre Window from the Dll. Unfortunately, I always get an exception:
System.IO.FileNotFoundException: Could not load file or assembly 'Mogre, Version=1.7.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.

What can I do ?

CrazyXBMax

01-03-2012 09:56:20

Do you have the other files like OgreMain.dll in the same directory as Mogre.dll?

Sigvald

01-03-2012 10:26:58

Do you have the other files like OgreMain.dll in the same directory as Mogre.dll?
Yes but I could have found the problem. Mogre is a x86 dll and the dll I have to develop must be in x64. I think that I have to compile Mogre in x64.

Pyritie

01-03-2012 18:31:01

Are you SURE you have all of the ogre files? If you're using Mogre 1.7.4, you'll also need OgrePaging.dll, OgreRTShaderSystem, and OgreTerrain.dll even if you never use them.

Also make sure

<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/>
</startup>


is somewhere in your app.config.

Sigvald

02-03-2012 08:46:37

I can't use .NET Framework 4.0 because I'm using VS 2008

Tubulii

07-03-2012 15:15:05

I can't use .NET Framework 4.0 because I'm using VS 2008
Is Mogre >1.7 compiled with .Net 4? If yes, that's the problem. You could try to recompile(!) Mogre with .Net <=3.5. Or use an older version. Or you use VS 2010 Express but if you have 2008 Pro, it is clear why you do not want to use the express versions ;)

Beauty

19-04-2012 15:50:13

Tutorial Framework: [...] I always get an exception:
Your problem is that the TutorialFramework is compiled against a specific Mogre binary.
The solution is very easy:
Download the sources of the framework and add the sources to your project. (and remove the link to the framework DLL file)
Then you can compile it together with your own application.
Additionally you can look how the framework works and can make modifications if needed.

Here is the (new/cloned) repository of the tutorial framework:
https://bitbucket.org/mogre/tutorialframework

Sorry for my late answer.
I was focused on the MogreBuilder, to fixing an Ogre bug and to my diploma thesis.