Hi! I found ways to circumvent many Squirrel and SqPlus problems until now when I tried to compile my program in release mode (which has optimization turned on). There is one specific code line that gives me an undefined reference during the linking process. This ONLY happens if I have any optimization turned on (O, O1, O2, using GCC). Here's the line which causes the error:
SquirrelObject vec( Vector3(x,y,z) );
And that's the error:
)]+0x1a) undefined reference to `void SqPlus::Push<Ogre::Vector3>(SQVM*, Ogre::Vector3&)'
I have defined the Vector3 class:
DECLARE_INSTANCE_TYPE_NAME (Ogre::Vector3, Vector3);
and register it, too:
SQClassDef <Ogre::Vector3> ("Vector3")
...
The funny thing is that it compiles flawlessly without optimization. Does anyone have an idea what I can do about this (except disabling optimization)?