making the simulator work

Here is a hack to make the simulator work with the current version of OpenFrameworks and Xcode 6. Add the following piece of code in the very end of main.mm (after the curly bracket of int main()</ closes.


extern "C"{
    size_t fwrite$UNIX2003( const void *a, size_t b, size_t c, FILE *d )
    {
        return fwrite(a, b, c, d);
    }
    char* strerror$UNIX2003( int errnum )
    {
        return strerror(errnum);
    }
    time_t mktime$UNIX2003(struct tm * a)
    {
        return mktime(a);
    }
    double strtod$UNIX2003(const char * a, char ** b) {
        return strtod(a, b);
    }
}


The code redirects a number of functions to work with XCode 6 simulators.

This entry was posted in Multitouch Interaction 2015. Bookmark the permalink.

Leave a Reply