Native calling on Linux x86-64 not working for a type

Started by
1 comment, last by WitchLord 2 years ago

I'm trying to make native calls on Linux 64bit work, as I thought they were implemented but maybe it's somewhat limited or there's something I missed because I get the following error:

Info : Mask Chunk::neighborMask()
Error : Don't support returning type ‘Mask’ by value from application in native calling convention on this platform
Error: Invalid configurartion. Verify the register application interface.

This works fine on Windows 64bit, Mask is registered as


registerType("Mask", sizeof(DirectionMask), asOBJ_VALUE | asOBJ_POD | asGetTypeTraits<DirectionMask>(), "Represents a directional mask, used for neighbors conditions calculator.");
registerMethod("Mask", "bool any()", CALL_METHOD(DirectionMask, any), "Returns true if any of the directions are set for the mask.");

and it's basically a wrapped 32 bit integer:

class DirectionMask {
{
private:
  uint_fast32_t mask;
  
public:
  // a lot of constexpr constructors
};
Advertisement

On Linux x64 a little bit more information is needed about the C++ type in order to support the native calling convention.

Try adding the flag asOBJ_APP_CLASS_ALLINTS when registering the type.

Refer to the manual for more info: http://www.angelcode.com/angelscript/sdk/docs/manual/doc_register_val_type.html#doc_reg_val_2

Regards,
Andras

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement