AutoWrap error

Vectrex

08-03-2010 08:56:25

Hi, just trying to wrap a non-Mogre sound lib 'cAudio' http://deathtouchstudios.com/xoops/modu ... p?itemid=3
I altered the ogre4j.doxygen to point to it's .h files and it seems to generate without errors.
Then running autowrap I get this error
"Type unknown: 'function'"

It occurs here in DefTypes.cs with the elem.Name which is 'function'

public static DefType CreateType(XmlElement elem)
{
switch (elem.Name)
{
case "class":
case "struct":
return CreateClass(elem);
case "typedef":
return CreateTypeDef(elem);
case "enumeration":
return CreateEnum(elem);
case "variable":
//It's global variables, ignore them
return null;
default:
throw new Exception("Type unknown: '" + elem.Name + "'");
}

GantZ

08-03-2010 17:52:36

which version of autowrap do you use ? i have recently made some change on the trunk, so i could be a problem for a library other than mogre .

otherwise, i remember i got this kind of error when the processing of the all.xml file into meta.xml were incorrect, mainly because of the input.xslt file that don't handle correctly all the type of the library. try to find the source of the problem, by putting breakpoint, to see which class/function is at fault. also, see the attributes.xml file, it's used to ignore and/or change wraptype of part of the library to avoid error. it could help in the process.

maguslin

12-10-2010 04:15:36

I've met the same error, and finally resolve this , thanks GantZ!
I post here for some other guys who maybe met the same error,and hope this is helpful .
the problem is caused because some code must be changed when wrap ogre into mogre,you must add CLI init part of every class, and this is just what a patch doing ,
so before use auto wrap ,MUST PATCH OGRE FIRST!!