I grabbed the latest snapshot of SqPlus to get ats' changes as well as the function overloading stuff, and now I am getting a ton of linker errors when I try and compile my project. Here is a snippet of the errors:
1>Matrix3Proxy.obj : error LNK2005: "void __cdecl SqPlus::Push<class Ogre::Degree>(struct SQVM *,class Ogre::Degree *)" (??$Push@VDegree@Ogre@@@SqPlus@@YAXPAUSQVM@@PAVDegree@Ogre@@@Z) already defined in BindingManager.obj
1>Matrix3Proxy.obj : error LNK2005: "void __cdecl SqPlus::Push<class Ogre::Degree>(struct SQVM *,class Ogre::Degree &)" (??$Push@VDegree@Ogre@@@SqPlus@@YAXPAUSQVM@@AAVDegree@Ogre@@@Z) already defined in BindingManager.obj
1>Matrix3Proxy.obj : error LNK2005: "bool __cdecl SqPlus::Match<class Ogre::Degree>(struct SqPlus::TypeWrapper<class Ogre::Degree &>,struct SQVM *,int)" (??$Match@VDegree@Ogre@@@SqPlus@@YA_NU?$TypeWrapper@AAVDegree@Ogre@@@0@PAUSQVM@@H@Z) already defined in BindingManager.obj
1>Matrix3Proxy.obj : error LNK2005: "bool __cdecl SqPlus::Match<class Ogre::Degree>(struct SqPlus::TypeWrapper<class Ogre::Degree *>,struct SQVM *,int)" (??$Match@VDegree@Ogre@@@SqPlus@@YA_NU?$TypeWrapper@PAVDegree@Ogre@@@0@PAUSQVM@@H@Z) already defined in BindingManager.obj
But there are a ton of them. I trace the problem down to the fact that I have
#ifndef __H_PROXIES_H__
#define __H_PROXIES_H__
DECLARE_INSTANCE_TYPE_NAME(Ogre::Degree, Degree)
DECLARE_INSTANCE_TYPE_NAME(Ogre::Radian, Radian)
DECLARE_INSTANCE_TYPE_NAME(Ogre::Vector3, Vector3)
DECLARE_INSTANCE_TYPE_NAME(Ogre::Matrix3, Matrix3)
#endif
In a head that is included in several of the CPP files (thus re-defining the symbols). This worked with the latest stable release of SqPlus, so what changed? Am I missing something obvious? The biggest issue that I've found is inter-proxy dependency. If the DECLARE_INSTANCE_TYPE doesn't come before the SQClassDef of a class that requires one of the previous instance types for a method or variable (such as Matrix3 having functions that return Vector3's), the Matrix3 SQClassDef will fail to compile, complaining about Vector3 not having the proper Get and Match methods.