CLang fails to build angelscript because it won't allow you to typecast a int to a struct:
[source lang="cpp"]
// Define template
template <int N>
struct asSMethodPtr
{
template<class M>
static asSFuncPtr Convert(M Mthd)
{
// This version of the function should never be executed, nor compiled,
// as it would mean that the size of the method pointer cannot be determined.
int ERROR_UnsupportedMethodPtr[N-100];
return 0;
}
};
[/source]
The following change fixes the error:
[source lang="cpp"]
...
int ERROR_UnsupportedMethodPtr[N-100];
asSFuncPtr p;
return p;
...
[/source]
Since CLang is a drop in replacement for GCC, it doesn't require any configuration changes to make native calling conventions work correctly.
Thanks,
Jeremy
Fix for building with CLang
Thanks. I've checked in this change in revision 947.
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