Code that was written on Win 7 x64 produces the asWRONG_CALLING_CONV error when compiled under Ubuntu 12.10 x64. I have checked the asGetLibraryOptions() string and it does not contain AS_MAX_PORTABILITY.
Any idea what could be wrong with this code?
struct floaty2
{
float x;
float y;
floaty2(float x, float y) : x(x), y(y)
{}
};
void floaty2_init_constructor(float x, float y, floaty2* self)
{
new(self) floaty2(x, y);
}
engine.register_object_type("floaty2", sizeof(floaty2), asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CA);
engine.register_object_property("floaty2", "float x", offsetof(floaty2, x));
engine.register_object_property("floaty2", "float y", offsetof(floaty2, y));
engine.register_object_behavior("floaty2", asBEHAVE_CONSTRUCT, "void f(float, float)", asFUNCTION(floaty2_init_constructor), Script_engine::Calling_convention::C_decl_obj_last);
The angelscript relevant parts are wrapped in a very thin layer, I hope you can still read the actual calls beneath it.