Frictional Games Forum (read-only)

Full Version: Frameworks not found compiling in Mountain Lion
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

It's my first time coding in Mac with XCode, and I'm having some silly problems, even compiling the OALWrapper.

Main one is XCode 5 can't find the SDL framework, even when it's here (at /Library/Frameworks/SDL.framework). I've tried by manually deleting it and adding it again. But still getting the same 2 errors:
  • OAL_Effect.cpp: SDL_mutex.h file not found
  • OAL_EffectSlot.cpp: SDL_mutex.h file not found

The file is there. It appears in Framewors, SDL.frameworks, Headers, in the project navigator. The same happens if I first include another SDL related header (it can't be found). So, it's not a problem with SDL_mutex.h itself

What am I doing wrong?

Many thanks in advance

Sorry, just realized this post should be in the OALWrapper forum. I added it here because I first had problems compiling the game itself. But I reduced the error to this library. Still have more errors to solve after this :-(
I believe the issue there is that I've made a # of changes to the OALWrapper code-base and haven't updated the Xcodeproject at all.. OALWrapper now supports compiling against SDL 1.2 AND SDL 2.0, to facilitate that the code expects the include path to be different so that #include <SDL_mutex.h> work, where as before #include <SDL/SDL_mutex.h> was used.

The simplest approach would actually be to ignore the xcodeproject and instead use CMake to generate new xcodeproject for your system
Actually, I've had to replace all the SDL includes with:

#include <SDL/SDL_xxxx.h>

That way, I've been able to compile OALWrapper. I've also installed SDL and SDL2 frameworks. Using SDL. Should I use SDL2?

Compiling with cmake, I get this error (Tried with XCode too, same result). I think that's positive. It's an error in the HPL1Engine, when including angelscript.h

This error:

error: no viable conversion from 'int' to 'asUPtr'
                return 0;

This is the code

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;

Of course, return 0 causes a problem, because it's returning an integer, instead of an asUPtr element.

But I see that code should not be compiled, and it's inside a ifndef:


Sounds like AS_NO_CLASS_METHODS is not defined, and that causes the problem. I'm probably using an old (or too new?) version of angelscript.h. It was included in a zip called dependencies, that I got from here

Am I missing something?

About the OS, I can use Mac OS Mountain Lion + XCode 5 (or XCode 4.6, I have both), Windows 7 + Visual Studio 2010 or Ubuntu 12.04 + usual coding stuff. I prefer Mac, but, which would be the recommended environment to work?