MYGui in Mogre application: cannot initialize myGui


30-04-2011 02:10:28

I'm relatively new to coding in C languages, and I've never worked in C++, and to top it off, I'm relatively new to using mOgre, and extremely new to the forum here, so a step by step explanation would be nice :) So here's my problem: Im not sure If i built myGui correctly, but it seems that i have, everything compiled without error, and when i was done with that i even ran the layout editor, which worked fine. I generated the wrappers, which also, compiled without error, except for the testapp projects. are those even necessary? just an fyi, all of these things DID initially result in errors, but after a (very, very) long process I was able to make them error free. Anyways, I went and added a reference to MyGui.managed.dll and to (both just for good measure). I instantiated a MyGui.Sharp.Window (also tried with MyGui.managed.Window) object, and my code compiled fine. but when i went to debug, Visual Studio (10) gave me a TypeInitializerException at the instantiation of window. I investigated and found the inner exception, which is as follows: {"Unable to load DLL 'MyGUI.Export.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"}. That's the exception for when i use myGui.Sharp. when i use myGui.managed, i get a fileNotFound exception, as follows: "Could not load file or assembly 'MyGUI.Managed.dll' or one of its dependencies. The specified module could not be found." I tried to initialize myGui.OgrePlatform.Export, but I cannot seem to access MyGui.OgrePlatform. I tried adding a reference to MyGui.OgrePlatform.Export.dll, which seems like the most logical thing to do. However, VS tells me that I cannot do so. it gives me a generic message that, in effect, says that It cannot add the file, and i should check to make sure it is a valid .NET or COM assembly. I'm sure im doing something wrong here, but I can't figure out what. anyone have suggestions?
EDIT: I'm using mOgre 1.7.1, and myGui 3.2.0


01-05-2011 00:20:31

Long story short, i get the error "The type or namespace name 'OgrePlatform' does not exist in the namespace 'MyGUI' (are you missing an assembly reference?)" when i try to use MyGui.OgrePlatform, and i cannot seem to add a reference to it


01-05-2011 18:34:07

SOLVED IT. i was making the really quite stupid mistake of using the release .dll's, while my application was in debug :oops: , and now everything works fine, as far as i can tell. Again, really not used to the C languages very much, done most of my coding so far in java. I just hope that anyone with a similar problem can learn from my mistake. :mrgreen:
EDIT: that actually doesn't seem to be the problem, as the release dll for MyGui.Sharp seems to work.
The problem actually seems to have something to do with the 'Copy Local' Property of MYGui.Managed.dll/myGui.Sharp.dll. for some reason, the project doesnt work without copy local set to true, and with the bin\ directory of myGui copied into the project folder. simply setting it to false doesn't seem to work.