The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Error caused by a version of a function that shouldn't be compiled
jorgeas80 Offline
Junior Member

Posts: 21
Threads: 7
Joined: Jan 2014
Reputation: 0
#1
Error caused by a version of a function that shouldn't be compiled

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 .'):

angelscript.h:784:10: error: no viable conversion from 'int' to 'asUPtr'
                return 0;
                       ^

The relevant portion of angelscript.h containing that line is:

#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
01-13-2014, 12:56 PM
Website Find


Messages In This Thread
Error caused by a version of a function that shouldn't be compiled - by jorgeas80 - 01-13-2014, 12:56 PM



Users browsing this thread: 1 Guest(s)