Hi,
I'm trying to get Angelscript running on Linux, both on 32bit and 64bit, but without much luck at the moment. I'm currently running the latest SVN version as of yesterday, but I've tried before with the stable version with unsuccessful results.
There are some issues with compiling on both platforms, firstly the in atomic.cpp. Looks like you've used a kernel header for your asCAtomic class which is a bit of a no-no according to the kernel developers, these functions/headers are only really meant to be used inside the kernel. I've changed it to use gcc built in atomic functions which seems to work o.k. for the few tests that do pass at the moment. See below for the changes.
#include <asm/atomic.h>
BEGIN_AS_NAMESPACE
asDWORD asCAtomic::atomicInc()
{
return atomic_inc_and_test(value);
}
asDWORD asCAtomic::atomicDec()
{
return atomic_dec_and_test(value);
}
#include <asm/atomic.h>
asDWORD asCAtomic::atomicInc()
{
return __sync_fetch_and_add(&value, 1);
}
asDWORD asCAtomic::atomicDec()
{
return __sync_fetch_and_sub(&value, 1);
}
I'm using test_feature to check Angelscript performs as expected, but I've had to change a few of the tests in order to get it to compile. The vector3 tests require scriptmath3d, but scriptmath3d needs new.h which I'm guessing is part of the MS CRT library? So for the moment I've just #ifndef __LINUX__ these tests out, perhaps once the rest of the code is working I'll look at trying to get this built as well.
On 64bit I've also had to #ifdef out a few of the tests in test_registertype due to them using asCALL_CDECL.
Anyway my current fail on 64bit is in test_stringscript testing script3, this seems to stem from the fact in asCContext::CallGeneric currentObject is NULL, so further on in scriptstring.cpp CScriptString::operator= is getting passed NULL for other.
I'll do some more digging and see if I can work out the exact cause of this, but perhaps you might be able to point me in the right direction?