samples/tutorial scriptstring on mac
I am reviewing angelscript as a script engine for a project I am working on. The lib compiles fine with #define AS_MAX_PORTABILITY. I have trouble running the samples/turial code though:
It exits in scriptstring.cpp:318 because r < 0. The actual line is:
r = scriptengine->RegisterObjectBehaviour("string", asBEHAVE_CONSTRUCT, "void f()", asFUNCTION(ConstructString), asCALL_CDECL_OBJLAST); assert( r >= 0 );
I debugged and got into:
as_scriptengine:1002
int r = DetectCallingConvention(datatype != 0, funcPointer, callConv, &internal);
which is being called with isMethod = true, callConv = 3 and therefore exits with asNOT_SUPPORTED
Any suggestions?
With AS_MAX_PORTABILITY turned on you will only be able to use the asCALL_GENERIC calling convention. Currently none of the samples have been prepared for this, but you may get an idea on how it works by looking at the test_generic.cpp in the tests/test_feature folder.
I intend to write a sample that will work with the AS_MAX_PORTABILITY mode as well, but haven't found the time to do so yet.
Regards,
Andreas
I intend to write a sample that will work with the AS_MAX_PORTABILITY mode as well, but haven't found the time to do so yet.
Regards,
Andreas
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
Could you add as_callfunc_ppc.cpp? That would instantly give you mac and xbox 360 support ;).
EDIT:
IMHO it's just the asm that differs from as_callfunc_x86.
EDIT:
IMHO it's just the asm that differs from as_callfunc_x86.
I would love to add an as_callfunc_ppc.cpp module, however I don't have a Mac to develop this code on. But if you or someone else would be interested in doing the port I will be more than happy to help with getting everything working.
I don't know if there will be any problem with endian differences. It would have to be tested.
Regards,
Andreas
I don't know if there will be any problem with endian differences. It would have to be tested.
Regards,
Andreas
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
Popular Topics
Advertisement