Here is the error code:
include/scripting/sqplus/sqplus.h: In function ‘void SqPlus::RegisterInstanceVariable(SquirrelObject&, void*, T*, const SQChar*, SqPlus::VarAccessType) [with T = int]’:
include/scripting/sqplus/sqplus.h:1801: instantiated from ‘SqPlus::SQClassDef<TClassType>& SqPlus::SQClassDef<TClassType>::var(VarType TClassType::*, const SQChar*, SqPlus::VarAccessType) [with VarType = int, TClassType = wxPoint]’
/home/obfuscated/projects/codeblocks/brances/wxfnb_to_wxaui/src/sdk/scripting/bindings/sc_wxtypes.cpp:283: instantiated from here
include/scripting/sqplus/sqplus.h:443: error: no matching function for call to ‘SqPlus::VarRef::VarRef(void*&, SqPlus::TypeInfo<int>, void*&, void (*)(void*, void*), long unsigned int, SqPlus::VarAccessType&, const SQChar*)’
include/scripting/sqplus/sqplus.h:304: note: candidates are: SqPlus::VarRef::VarRef(void*, SqPlus::ScriptVarType, void*, void (*)(void*, void*), SQInteger, SqPlus::VarAccessType, const SQChar*)
include/scripting/sqplus/sqplus.h:303: note: SqPlus::VarRef::VarRef()
include/scripting/sqplus/sqplus.h:294: note: SqPlus::VarRef::VarRef(const SqPlus::VarRef&)
Commenting the code bellow fixes the issue 8) 8) :lol:
SqPlus::SQClassDef<wxPoint>("wxPoint").
emptyCtor().
staticFuncVarArgs(&wxPoint_OpCmp, "_cmp", "*").
var(&wxPoint::x, "x").
var(&wxPoint::y, "y");
spec: gentoo linux amd64, gcc 4.3.3 c::b head trunk/wxaui branches
The problem seems to be that on 64-bit systems squirrel uses long for the int template, but long and int have different-sizes here.
Adding the following code in sc_base_types.h (namespace SqPlus) works for me:
template<>
struct TypeInfo<SQInt32>
{
const SQChar * typeName;
TypeInfo() : typeName(sqT("int")) {}
enum {TypeID=VAR_TYPE_INT,Size=sizeof(SQInt32)};
operator ScriptVarType() { return ScriptVarType(TypeID); }
};
Other devs (Martin?), please have alook at it, I do not have much experience with squirrel, and I can not test it on Win and or 32-bit at the moment.