XCode C++ project and using frameworks ??

Discussion in 'Mac Programming' started by BananaDuffle, Jan 15, 2010.

  1. BananaDuffle macrumors member

    Joined:
    Mar 29, 2009
    #1
    Hi all,

    I'm trying to create a C++ project that uses a framework (mono).
    I've clicked on the project in groups and files> add> existing framework and added the framework.

    I've then gone to Project > Edit Project Settings and set "always search user paths" to true and added the framework's header path.

    but when I use
    #include <mono/jit/jit.h>
    it complains that the file can not be found

    When I use the full file path it finds the header then goes on to generate lots more errors because it cant find the header files that the header file uses itself.

    My project type is C++ tool...

    If i need to set any compiler flags what are they and how do i set them inside XCode (Excuse me but I'm normally a VS users on a windows box, with a little iPhone development, though my Cocoa projects seem to use frameworks seamlessly)

    Thanks.
     
  2. BananaDuffle thread starter macrumors member

    Joined:
    Mar 29, 2009
    #2
    ... OK I just added the SDL.framework and it recognised SDL immediately :( guess its a mono.framework problem.
     
  3. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #3
    1. <header> is how you Standard C++ or C header files (that is header files defined by the language itself). You should #include "mono/jit/jit.h"

    2. What exactly is the header path? If the header path is /.../something/mono, and you try to include "mono/jit/jit.h", then the compiler will look for a file named /.../something/mono/mono/jit.jit.h. See the two "mono"s? That's likely why it doesn't work.
     
  4. MorphingDragon macrumors 603

    MorphingDragon

    Joined:
    Mar 27, 2009
    Location:
    The World Inbetween
    #4
  5. BananaDuffle thread starter macrumors member

    Joined:
    Mar 29, 2009
    #5
    Thanks guys, it's still not working ....

    I used the pointy bracers as it's suggested by the documentation @
    http://www.mono-project.com/Embedding_Mono.

    @MD I'm planning on using C# as a scripting language as it's multi-platform and you can compile it.

    It's nothing more that a pet project; i'm playing with embedding a .NET scripting engine just for kicks.

    Ironically I got it working under windows and I had to generate my own .lib file from the dll and mess around with the paths to the headers and includes... but I just can not get it working in XCode :mad:
     

Share This Page