Having trouble with SDK 1.2.2 in VS2005 C#

farm

10-08-2006 00:27:17

Hello!

First, I must say that yes, I am a newbie with OGRE.

I have some problems using OGRE.Net in C# (Visual Studio 2005 Pro).

I have downloaded the SDK version 1.2.2 from SourceForge, then the OgreDotNet from the CVS, just as the wiki says (Ogre SDK into D:\OGRESDK, dotnet into an ogreaddons\ogredotnet subfolder - no spaces or whatsoever), then downloaded SWIG and installed it properly.
I have managed to compile both the c++ projects (OgreDotNet_vc8.sln) and the c# ones (OgreDotNet_vcs8.sln) as well, excluding those using Gangsta, because as for now, I don't need them.
Then I have created a new console app, again, just as the wiki says. Dropped the appropariate files in the bin\debug folder, added the references, then pressed build. The build succeded, and I was happy. For at most a second, until I get the following error: "Unable to load DLL 'OgreBindings': The specified module could not be found. (Exception from HRESULT: 0x8007007E)". Then, I have tried to get some help: I googled a bit, and found this: http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=821. I got happy again, that others had this problem as well, and it seems they could solve it. I have restarted everything from scratch, and followed the steps ElectricBliss wrote, as his problem could be solved. The only exception is that I have used SDK version 1.2.2, as mentioned above.
But, here is something: I DO have the Ogrebindings.dll in the bin\debug directory.

My application's code is the following:

using System;
using System.Drawing;
using OgreDotNet;
using Math3D;
namespace TutorialApplication1
{
class TutorialApplication : ExampleApplication
{
protected override void CreateScene()
{
}
//[STAThread]
static void Main(string[] args)
{
using(TutorialApplication app = new TutorialApplication())
{
app.Start();
}
}
}
}

This really should work, I think (this is a copy-paste from the wiki).

As I hope you see, I have tried to be an as-good-as-possible newbie, looked for answers before asking stupid questions. However, the aswers did not work in my case.

I have more than 12 hours in making it work, without success. Please, tell me what did I do wrong (or did not do at all), as I would really like to use OGRE.

Thank you:
Farm

timoch

11-08-2006 22:37:45

Had a similar problem. The error you get means that OgreBindings or any of its dependency (may it be direct or indirect could not be found). That is it can be ogre native dlls that can't be loaded.

I solved it by placing *all* DLLs in my output directory. .net dlls as well as *bindings dll and ogre native dlls.

The native dlls can be anywhere so far as they are in the PATH but make sure you don't mix debug and release dlls from native ogre and the bindings/.net$

Luck

TiMoch

farm

14-08-2006 00:23:10

Thank you, TiMoch!

Now I'm getting sure I'm f**ing something up seriously, but I can't solve it, anyway. I've searched the SDK for all the dlls it has (debug ones), and the .net folders as well... There were no dlls I did not have in my bin\debug...

Can you please upload your files somewhere, or at least the filelist?
Thank you: Farm

timoch

14-08-2006 08:25:22

Here is the list of dlls I have in my output directory :
1 593 344 CEGUIBase.dll
299 008 CeguiBindings.dll
446 464 CeguiDotNet.dll
188 416 CEGUIFalagardBase.dll
278 528 CEGUITaharezLook.dll
311 296 CEGUIWindowsLook.dll
1 683 456 cg.dll
761 856 DevIL.dll
106 496 GangstaBindings.dll
98 304 GangstaDotNet.dll
73 728 ILU.dll
15 872 ILUT.dll
40 960 Math3D.dll
1 298 432 OgreBindings.dll
16 896 OgreBindings_Cegui.dll
32 768 OgreDotNet.Cegui.dll
1 470 464 OgreDotNet.dll
61 440 OgreGUIRenderer.dll
2 494 976 OgreMain.dll
372 736 OgrePlatform.dll
163 840 Plugin_BSPSceneManager.dll
31 232 Plugin_CgProgramManager.dll
217 088 Plugin_OctreeSceneManager.dll
521 216 Plugin_PagingLandScapeSceneManager2.dll
100 864 Plugin_ParticleFX.dll
339 968 ReferenceAppLayer.dll
1 155 072 RenderSystem_Direct3D9.dll
512 000 RenderSystem_GL.dll
55 808 zlib1.dll


I use release dlls from SDK 1.2.0
I can't post the actual files b/c I have a slow connection. You can download SDK 1.2.0 here http://sourceforge.net/project/showfiles.php?group_id=2997&package_id=2939&release_id=415249
and the .NET dlls here http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=1203