Problem starting up Ogre.


14-07-2006 13:13:27

it seems I'm too stupid for OgreDotNet...

I pretty much copied everything from this tutorial, set up my project as described on the wiki, copied almost every dll from ogre's directory and all of OgreDotNet's dlls.

still, every time I start up this very basic programm I get an exception thrown on "new Root()":

System.TypeInitializationException: The type initializer for 'OgreDotNet.OgreBindingsPINVOKE' threw an exception. ---> System.TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'OgreBindings': Die angegebene Prozedur wurde nicht gefunden. (Exception from HRESULT: 0x8007007F)
at OgreDotNet.OgreBindingsPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_OgreBindings(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate)
at OgreDotNet.OgreBindingsPINVOKE.SWIGExceptionHelper..cctor() in C:\Dev\ogre\odnt\ogredotnet\OgreNet\OgreBindingsPINVOKE.cs:line 101
--- End of inner exception stack trace ---
at OgreDotNet.OgreBindingsPINVOKE.SWIGExceptionHelper..ctor()
at OgreDotNet.OgreBindingsPINVOKE..cctor() in C:\Dev\ogre\odnt\ogredotnet\OgreNet\OgreBindingsPINVOKE.cs:line 120
--- End of inner exception stack trace ---
at OgreDotNet.OgreBindingsPINVOKE.new_Root__SWIG_3()
at OgreDotNet.Root..ctor() in C:\Dev\ogre\odnt\ogredotnet\OgreNet\Root.cs:line 106
at OniNET.Oni..ctor(Control control) in D:\kt\Visual Studio 2005\Projects\OGRE\OniNET\OniNET\Oni.cs:line 63
at Oni.MainForm..ctor() in D:\kt\Visual Studio 2005\Projects\OGRE\OniNET\Oni\MainForm.cs:line 17
at Oni.Program.Main() in D:\kt\Visual Studio 2005\Projects\OGRE\OniNET\Oni\Program.cs:line 19

with the inner exception resolving to:
Unable to load DLL 'OgreBindings': Die angegebene Prozedur wurde nicht gefunden. (Exception from HRESULT: 0x8007007F)
(the german part translates to something like "The required procedure cannot be found.")

funny part is, OgreBindings.dll is in the folder and it still doesn't find it. I tried running the executeable from the debugger and directly, nothing worked.
I have no idea what's wrong.


14-07-2006 14:10:51

That's the error I was getting, you probably have the v1.2.1 SDK and the v1.2 dll's.

Grab the 1.2.0 SDK from Sourceforge and use the Precompiled dll's in the Sticky.

Here's my (albeit brief) post on it.


18-07-2006 00:48:05

I downloaded the 1.2 SDK to replace my 1.2.1 SDK and am using the prebuilt DLLs and still get the same error as zeroflag in both Debug and Release modes. I followed the tutorial as well, copying all the DLLs into the proper output directories and set up my resources.cfg file correctly. Anyone know what's going on?


18-07-2006 02:21:33

Hi, i am very newbie, i have 1 week working with Ogre, and same you i had the same mother fucking problem to use OgreDotNet (excuse me that expresion) that cost me very very effort. Ok go to the solution.

This solution is for OgreSDK 1.2.0 and VS2005 Pro, i think that works for VS2005 express too.

1) Use OgreSDK 1.2.0 not 1.2.1
2) This is the list of all files that you need to have in your output directory

CEGUIBase_d.dll CeguiBindings.dll
CeguiBindings.pdb CeguiDotNet.dll
CeguiDotNet.pdb CEGUIFalagardBase_d.dll
CEGUITaharezLook_d.dll CEGUIWindowsLook_d.dll
cg.dll DemoCEGUI.exe
DemoCeguiMenus.exe DemoCelShading.exe
DemoCompositor.exe DemoCustomObjects.exe
DemoFireworks.exe DemoGAPyramid.exe
DemoGrass.exe DemoParticleFX.exe
DemoRenderToTexture.exe DemoRSQ.exe
DemoSkyBox.exe DemoWinForms.exe
DevIL.dll GangstaBindings.dll
GangstaBindings.pdb GangstaDotNet.dll
GangstaDotNet.pdb ILU.dll
ILUT.dll lista.txt
Math3D.dll Math3D.pdb
media.cfg ogre.cfg
OgreBindings.dll OgreBindings.pdb
OgreBindings_Cegui.dll OgreBindings_Cegui.pdb
OgreCS.pdb OgreDotNet.Cegui.dll
OgreDotNet.Cegui.pdb OgreDotNet.dll
OgreDotNet.pdb OgreGUIRenderer_d.dll
OgreMain_d.dll OgrePlatform_d.dll
Plugins.cfg Plugin_BSPSceneManager.dll
Plugin_CgProgramManager.dll Plugin_OctreeSceneManager.dll
Plugin_ParticleFX.dll RenderSystem_Direct3D9.dll
RenderSystem_GL.dll Resources.cfg
SkeletalAnimation.exe zlib1.dll

3) Then, download this fixed files for Ogre and OgreDotNet replace all in output directory
Note: if canĀ“t open the url, copy it and paste it in browser url bar and open from there.

4) If you use VS2005 your project folder structure look like this:
--------<all the DLL files and examples>
---Media ---> this folder is copied from OgreSDK folder
---Samples --> copied from OgreDotNet sources

5) Check Resources.cfg and look if the paths match with your project folder. For the previous structure, Resources.cfg will be:

# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework

# Resource locations to be added to the default path


#To use GangstaDotNet, correct the path and uncomment the line below

6) Be very carfull in the Resources.cfg, one syntax error will fuck Ogre
7) That is all Folks....

For me that solution works perfectly


18-07-2006 13:33:18

Thanks for those fixed files. What exactly is changed about them, anyway? What do I do for release version of OgreDotNet? I noticed your fixed versions were the debug ones.


18-07-2006 14:57:15

Hi.. the fix in some files (the ODN files) is only files compiled with VS2005, other fixes add to some lines of code to run the ODN demos.

If you want a realease only copy all DLL without xx_d.dll and done..

PD: Can you fix your problems?


18-07-2006 18:28:34

Just to say that I'm having exactly the same issue as zeroflag & nickgravelyn. Marioko's fix didn't work for me.


19-07-2006 03:56:33

Hi.. the fix in some files (the ODN files) is only files compiled with VS2005, other fixes add to some lines of code to run the ODN demos.

If you want a realease only copy all DLL without xx_d.dll and done..

PD: Can you fix your problems?

Thanks. And yes, it did fix my problems. Thanks for the help.


20-07-2006 16:37:27

Just bumping this in the hope that one of the ODN guys can shed some light, because if not, I'm going to have to ditch it. :?


20-07-2006 17:44:41

I've never had good luck with the SDK. Ogre & ODN seem to work best for me when they are compiled from the CVS source.

Compiling from source takes a little while and you'll have to move some files around, but there are other threads here about compiling from source if what's on the wiki doesn't work for you.



21-07-2006 11:24:05

No luck with that either, I'm afraid, but thanks for the idea. Looks like I'm going to have to give it another go some time in the future.


22-07-2006 03:02:11

lets walk through this step by step.

first, download the ogre cvs (be sure to get the released version) and compile it.

post a message here once you are done.


22-07-2006 18:44:13

I'm using the stable 1.2 source release. Anyway, done.