"Module could not be found" exception.

DrZoop

14-10-2007 17:46:18

Greetings all:

In attempting to run Tutorial 0, I get the following exception before it runs my own code: "The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

If I view the callstack, it says:
at MOgre1.mdlMain.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 have checked and rechecked the checklist. I am running the project in VB.NET, though the fact it does not even enter my application should not make any difference at all. (Besides the fact VB.NET and C#.NET are nearly identical anyway!)

I have installed the Visual C++ Redistributable.

What I think may be going wrong: I can't install Visual Studio SP1 because stupid Microsoft decides to put all temporary files on my C drive which is unfortunately only has one GB left. I can get the install to get a few minutes into the install, before it gives up saying there is not enough disk space left even though there is nearly 400 MB of space left on the C drive. My C drive is devoted to Windows only. I don't have anything on there except Windows. Visual Studio and the OgreSDK are on my D drive and I have updated the config file and path to show that. Regardless of my SP1 issues, it was mentioned that installing the Visual C++ redistributable would fix that anyway.

Also, is the SDK hardcoded anywhere to be at C:\OgreSDK?

If this helps... the samples do not run either. They are all in one giant project Visual Studio seems to hate that: "A project with an Output Type of Class Library cannot be started directly. In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project." I may be able to make it work by manually reconstructing one of the projects.

(Please help quickly. I have to learn Ogre super quickly, as I am transitioning over from plain Managed DirectX to MOgre for my 3D needs. I have to convert potentially two projects ASAP.)

EDIT: If I copy essentially the whole SDK into the project folder (to ensure all paths are correct), I get the following when I try to run the debug version: "Could not load file or assembly 'Mogre, Version=0.2.2.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)" even though Mogre.dll is within the debug and release folders. If I run the release version I get the following: "Could not load file or assembly 'MogreFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified." What the heck is going on!?

Thanks!

pin

18-10-2007 13:44:36


Also, is the SDK hardcoded anywhere to be at C:\OgreSDK?


No but you will have less headache if you use that path.


I can't install Visual Studio SP1


You only need VS SP1 redist if you're using OgreSDK.

If it helps I have my own guide for setting up Mogre =]

DrZoop

26-10-2007 02:36:46

SOLVED! Skip to edit.

Okay... after much frustration, repartitioning my C and D drives, and two weeks of time, I have gotten MOgre to compile in VB and C#.

Now I have an issue that seems to be a bug with MOgre itself... grand...:

Dim misc As New NameValuePairList
misc("externalWindowHandle") = myForm.Handle
myRenderWindow = myRoot.CreateRenderWindow("Main RenderWindow", 800, 600, False, misc)


Copied straight from tutorial six (http://www.ogre3d.org/wiki/index.php/Mo ... l_6_Source), but put into VB syntax (remember, C# and VB are essentially the same). The problem is that the last argument of CreateRenderWindow is of type Const_NameValuePairList, not of regular NameValuePairList.

Of course... this is the most critical part of integrating MOgre into Windows Forms... as this is the part that gives it the Window handle.

And I can't spend another two weeks fixing this problem either! Quick help would be wonderful!

EDIT: Apparently I suck at searching :-P. I found the solution right after I posted. In case someone else runs into this post needing to fix the same problem:

Dim misc As New NameValuePairList
misc("externalWindowHandle") = Form.Handle.ToString()
Dim const_list As Const_NameValuePairList = misc.ReadOnlyInstance
myRenderWindow = myRoot.CreateRenderWindow("Simple Mogre Form Window", 0, 0, False, const_list)


Sorry for my frustrations.