01-13-2014, 12:56 PM
Hello,
I'm trying to compile Penumbra: Overture in my Mac running Mountain Lion. As I've had some problems with the xcode project in the repo, I'm trying to compile using make. I've successfully compiled OALWrapper, but still getting an error compiling H1Engine. This error (when executing 'make', after a successful 'cmake .'):
The relevant portion of angelscript.h containing that line is:
So, looks like that code shouldn't be compiled, but is because AS_NO_CLASS_METHODS is not defined. I understand the error, but not the cause.
Any clues?
Many thanks in advance
I'm trying to compile Penumbra: Overture in my Mac running Mountain Lion. As I've had some problems with the xcode project in the repo, I'm trying to compile using make. I've successfully compiled OALWrapper, but still getting an error compiling H1Engine. This error (when executing 'make', after a successful 'cmake .'):
Code:
angelscript.h:784:10: error: no viable conversion from 'int' to 'asUPtr'
return 0;
^
The relevant portion of angelscript.h containing that line is:
Code:
#ifndef AS_NO_CLASS_METHODS
// Method pointers
// Declare a dummy class so that we can determine the size of a simple method pointer
class asCSimpleDummy {};
typedef void (asCSimpleDummy::*asSIMPLEMETHOD_t)();
const int SINGLE_PTR_SIZE = sizeof(asSIMPLEMETHOD_t);
// Define template
template <int N>
struct asSMethodPtr
{
template<class M>
static asUPtr 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[-1];
return 0; ---> THIS IS THE LINE CAUSING THE ERROR
}
};
// ... more code here
So, looks like that code shouldn't be compiled, but is because AS_NO_CLASS_METHODS is not defined. I understand the error, but not the cause.
Any clues?
Many thanks in advance