Please Help Me.. My First Ogre3D Program.
i just started Ogre Today. and downloaded & installed Mogre & set it up already.
please help me to get started with my first app.
i am using Microsoft Visual C# 2005 Express(service pack installed)
Microsoft Visual Studio 2005
Version 8.0.50727.762 (SP.050727-7600)
Microsoft .NET Framework
Installed Edition: C# Express
Microsoft Visual C# 2005
Microsoft Visual C# 2005
i added the refrence files. (.dlls from Bin/Release folder).
and copied the cfg files from bin/release to the : "Project Folder/Bin/Release , Debug"
and i just followed the First Tutorial in Wiki..
as shown below..
static class Program
static void Main()
OgreWindow win = new OgreWindow();
but there is a error !
error in >> Win.Go();
i already searched the forum & cannot get it work.
here is a screenshot of my error..
Thanks a lot..
Not only you need add references to debug or release folders. You also need put to proyect the references.
In Visual Studio's right view you can see the files and a dir named References, Open, select the dir and push left mouse button. Now click on Add Reference an click on .Net assemblies, now you can link to the OGRESDK references in debug or in release dir.
i think its still showing the same error...
any ideas ?
It depends a bit on your directory layout, but I'm guessing it cannot load the other DLLs which mogre depends on.
I usually set it up so that the build copies the exe to OgreSDK/bin/debug in the post build step, and then also set OgreSDK/bin/debug as the working dir for debugging the project. My post build is like this: "copy $(TargetPath) $(SolutionDir)\..\bin\$(ConfigurationName)" but obviously depends on your dir layout.
I guess as an alternative you could copy all the stuff from OgreSDK/bin/debug to your project's debug dir and then fixup the config files, but I think it will be harder to get working if you are just starting out with Mogre.
yes. i am just started with mogre now..
I'm having a similiar problem with Win.Go giving out, but this time it doesn't to matter what I do it just keeps happening. Also, all of the demos seem to give a similiar error.
I'm using C#.net 2005 express. This is the exception:
Could not load file or assembly 'Mogre, Version=0.2.0.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)
I've tried moving all the files from the release directory to the project's debug folder, referenced the two dlls and changed the cfgs to the right directories. But it still doesn't work.
Thanks for any help
Do you have Service Pack 1 for VC# 2005?
You can also try using DependencyWalker (just google it) on the Mogre.dll file to see if you are missing anything else.
Hope this helps,
Yes! Thankyou for your help, it was obviously the service pack it needed. It's all go now!
I'm having the same problem with the FileLoadException error. I have VC 2005 Professional with Service Pack 1 installed. I have ran the Dependency Walker on mogre.dll and it comes up with an error saying that it cannot find MSVCR80.DLL or DWMAPI.DLL. The thing is I have found MSVCR80.DLL all over my system, including the VS8 installation directory but I can't seem to find DWMAPI.DLL anywhere. Does anyone know why it isn't picking up my msvcr80.dll file and why I would be missing dwmapi.dll entirely? Is it something that only VC8 Express has?
This is absolutely maddening. I've wasted my entire day trying to get this damn thing to work. I've tried getting this to work on two entirely different machines now. The first machine is a XP SP2 box with VS 2k5 Pro SP1 and the second box is Vista64 with the same VS 2k5 Pro SP1. I have uninstalled and reinstalled both versions 0.2.0 and 0.2.2 countless times and am always getting an error with mogre.dll. I've uprooted the MogreFramework and attempted to start ogre with a new framework of my own and it didn't work. I also made sure to update both machines to make sure I wasn't missing anything. Restarted the computers a few times in between installations to make sure things go through and nothing. My last attempt at this was to compile mogre.dll myself but apparently the trunk has a bunch of missing files because as I looked through the project there are supposed to be a bunch of files in the include/auto directory and there is nothing in the svn trunk I checked out (revision 220). I have absolutely no problem compiling and running the ogre3d sdk in C++. I fail to see how re-installing visual studio would help at this point since i've tried this on two completely different machines. Given all that I think it's fair to say i've tried literally everything.
So please, can someone tell me what magical setup it requires to get this thing working and be detailed in how to do it? Because apparently i'm a complete moron and can't follow directions. Thanks.
Thank you for responding Pelle.
I just did a fresh re-install of the 0.2.2 SDK. After successfully building the Samples sln file with 0 errors and 0 warnings I attempt to execute any of the demos and get the error:
BadImageFormatException was unhandled
Could not load file or assembly 'Mogre, Version=0.2.2.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
This is the same message I have always gotten from my Vista64 box. On my XP box, I get a different Exception but with the same message body.
I have installed the VC redistributable package, a couple of times for that matter and still no difference.
As for when i'm building my applications, I have tried both methods of execution... The first being: copy all of the contents from C:\OgreSDK\bin\debug to my bin\debug and then change the resources.cfg to reflect C:/OgreSDK/ instead of ../../
Second, I have set up my solution to build to the C:/OgreSDK/bin folder or copy the build files to the appropriate OgreSDK folder. Still no luck.
I will look at the instructions for building mogre myself later.
Hmmm ... I don't know if there are any issues with 64-bit, I've only tested on 32 bit.
How do you run the sample, from inside VC#? If so please try running it standalone from bin/debug or bin/release.
If it's any help I can try sending you some of my binary compiled samples.
Ok so there definitely seems to be an incompatibility with 64-bit. I did another fresh install of 0.2.2 on my XP box and am able to run the mogre demos but only by executing them standalone. Cannot use debugger apparently, which is rather unfortunate really but can be worked around. I will try and get my code to work now and see how that goes.
As for 64-bit, my guess to why its not working is because the JIT compiles the application to the native architecture when no CPU arch is selected and if so this will have a problem with the 32-bit ogre (and other) library's. Windows does not allow any 64-bit application to execute 32-bit code within it and vice versa. It must be all or nothing. Once I get home I will try and force it to build with 32-bit and see if that helps. It would be really nice if sinbad could get a 64-bit version of ogre working though.
To get debugging working what I have done for my MOGRE projects is:
Use the debug version of mogre.dll when adding the reference, same goes for any other modules e.g. MOIS.
Setup the project with a post-build step to copy the exe to ogresdk/bin/debug, as mentioned earlier.
Set the debug properties of the project to use ogresdk/bin/debug as the working directory.
With this setup I have been able to debug my MOGRE apps.
Update: I was able to get the demo's to compile and run successfully on Vista 64-bit. In order for it to run, the build settings must be set to compile for x86 instead of Any CPU. Only then will it run on 64-bit.
Hey Bekas nice to see you back!