idcsteve
24-08-2012 16:09:49
Hi all,
I'm stepping way outside my comfort zone and trying to wrap the ogremax scene loader. My primary goal is to get it to work without losing the will to live.
I've successfully compiled Mogre in x64, and it's all been lovely. I've wrapped libraries before, so I thought I'd give this a crack. Not a good plan!
My current problem is an error message that says
Plus a whole lot more of those. Using ildasm, I've found that this particular error refers to CustomAttribute2 of Ogre::Radian. The other errors refer to other structures, like Ogre::Degree. The exact text in the output is:
Has anyone who knows more than me about how Mogre talks to c++ (i.e. most of you, and probably my cat too) seen something like this and, if so, do you know how to fix it?
I got this far by:
Compiling TinyXML with stl in release 64 with /MD
Creating a Clr Class Library project called OgreMaxWrapper
Copying the files recommended by the Ogremax documentation (http://www.ogremax.com/Documents/OgreMa ... -code.html) to my project
Referencing the Ogre include directories
Referencing the Mogre include directories and Mogre.lib (I tried linking to OgreMain.lib instead, with exactly the same result, right down to the hex in the error codes).
Using the following simple file, the credit (or blame) for which comes from viewtopic.php?f=8&t=13711 and looking at how mogre does wrapping internally.
I can provide any other details you might need on this, but I'm not sure what could be relevant.
Any suggestions welcome!
Thanks for getting this far,
Steve
P.S. There are 100 metadata errors. Here's a sample:
I'm stepping way outside my comfort zone and trying to wrap the ogremax scene loader. My primary goal is to get it to work without losing the will to live.
I've successfully compiled Mogre in x64, and it's all been lovely. I've wrapped libraries before, so I thought I'd give this a crack. Not a good plan!
My current problem is an error message that says
Error 1 error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c00000a). C:\Users\VTime\Documents\Visual Studio 2010\Projects\VTimeGame\OgreMaxWrapper\OgreMaxWrapper.obj OgreMaxWrapper
Plus a whole lot more of those. Using ildasm, I've found that this particular error refers to CustomAttribute2 of Ogre::Radian. The other errors refer to other structures, like Ogre::Degree. The exact text in the output is:
CustomAttribute #2 (0c00000a)
// -------------------------------------------------------
// CustomAttribute Type: 0a000002
// CustomAttributeName: System.CLSCompliantAttribute :: instance void .ctor(bool)
// Length: 5
// Value : 01 00 00 00 00 > <
// ctor args: ( <can not decode> )
Has anyone who knows more than me about how Mogre talks to c++ (i.e. most of you, and probably my cat too) seen something like this and, if so, do you know how to fix it?
I got this far by:
Compiling TinyXML with stl in release 64 with /MD
Creating a Clr Class Library project called OgreMaxWrapper
Copying the files recommended by the Ogremax documentation (http://www.ogremax.com/Documents/OgreMa ... -code.html) to my project
Referencing the Ogre include directories
Referencing the Mogre include directories and Mogre.lib (I tried linking to OgreMain.lib instead, with exactly the same result, right down to the hex in the error codes).
Using the following simple file, the credit (or blame) for which comes from viewtopic.php?f=8&t=13711 and looking at how mogre does wrapping internally.
#pragma once
#include "Stdafx.h"
#include "MogreStableHeaders.h"
#include "OgreMaxScene.hpp"
using namespace System;
namespace OgreMaxWrapper {
public ref class Scene
{
OgreMax::OgreMaxScene* _scene;
public:
Scene()
{
_scene = new OgreMax::OgreMaxScene();
}
void Load
(String^ fileNameOrContent,
Mogre::RenderWindow^ renderWindow)
{
}
};
}
I can provide any other details you might need on this, but I'm not sure what could be relevant.
Any suggestions welcome!
Thanks for getting this far,
Steve
P.S. There are 100 metadata errors. Here's a sample:
Error 101 error LNK1255: link failed because of metadata errors C:\Users\User\Documents\Visual Studio 2010\Projects\UserGame\OgreMaxWrapper\LINK OgreMaxWrapper
Error 1 error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c00000a). C:\Users\User\Documents\Visual Studio 2010\Projects\UserGame\OgreMaxWrapper\OgreMaxWrapper.obj OgreMaxWrapper
Error 2 error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c00000e). C:\Users\User\Documents\Visual Studio 2010\Projects\UserGame\OgreMaxWrapper\OgreMaxWrapper.obj OgreMaxWrapper
Error 3 error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c000012). C:\Users\User\Documents\Visual Studio 2010\Projects\UserGame\OgreMaxWrapper\OgreMaxWrapper.obj OgreMaxWrapper
Error 4 error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c000016). C:\Users\User\Documents\Visual Studio 2010\Projects\UserGame\OgreMaxWrapper\OgreMaxWrapper.obj OgreMaxWrapper
Error 5 error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c00001a). C:\Users\User\Documents\Visual Studio 2010\Projects\UserGame\OgreMaxWrapper\OgreMaxWrapper.obj OgreMaxWrapper
Error 6 error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c000021). C:\Users\User\Documents\Visual Studio 2010\Projects\UserGame\OgreMaxWrapper\OgreMaxWrapper.obj OgreMaxWrapper
Error 7 error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c000023). C:\Users\User\Documents\Visual Studio 2010\Projects\UserGame\OgreMaxWrapper\OgreMaxWrapper.obj OgreMaxWrapper
Error 8 error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c000028). C:\Users\User\Documents\Visual Studio 2010\Projects\UserGame\OgreMaxWrapper\OgreMaxWrapper.obj OgreMaxWrapper
Error 9 error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c00002f). C:\Users\User\Documents\Visual Studio 2010\Projects\UserGame\OgreMaxWrapper\OgreMaxWrapper.obj OgreMaxWrapper
Error 10 error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c000037). C:\Users\User\Documents\Visual Studio 2010\Projects\UserGame\OgreMaxWrapper\OgreMaxWrapper.obj OgreMaxWrapper
Error 11 error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c000056). C:\Users\User\Documents\Visual Studio 2010\Projects\UserGame\OgreMaxWrapper\OgreMaxWrapper.obj OgreMaxWrapper