Comment avez-vous d'inclure des fichiers en C++ de la Bibliothèque /Cadre de dossier de MAC

Je suis en train d'utiliser la SDL. J'ai un dossier dans /Library/Frameworks appelé SDL2.framework. Je veux inclure le fichier SDL.h dans mon projet. Comment dois-je faire? Mon code ressemble à ceci:

//Example program:
//Using SDL2 to create an application window

#include <SDL.h>
#include <stdio.h>

int main(int argc, char* argv[]) {
    SDL_Window *window;                    //Declare a pointer
    SDL_Init(SDL_INIT_VIDEO);              //Initialize SDL2
    //Create an application window with the following settings:
    window = SDL_CreateWindow(
        "An SDL2 window",                  //window title
        SDL_WINDOWPOS_UNDEFINED,           //initial x position
        SDL_WINDOWPOS_UNDEFINED,           //initial y position
        640,                               //width, in pixels
        480,                               //height, in pixels
        SDL_WINDOW_OPENGL                  //flags - see below
    );
    //Check that the window was successfully made
    if (window == NULL) {
        //In the event that the window could not be made...
        printf("Could not create window: %s\n", SDL_GetError());
        return 1;
    }
    //The window is open: enter program loop (see SDL_PollEvent)
    SDL_Delay(3000);  //Pause execution for 3000 milliseconds, for example
    //Close and destroy the window
    SDL_DestroyWindow(window);
    //Clean up
    SDL_Quit();
    return 0;
}

L'erreur que j'obtiens est:

Aarons-MacBook-Air:SDL aaron$ g++ main.cpp
main.cpp:4:10: fatal error: 'SDL.h' file not found
#include <SDL.h>
          ^ 1 error generated.

Comment puis-je inclure la SDL fichier? C'est à l'intérieur SDL2.framework, headers, SDL.h...

avez-vous ajoutez le cadre du projet?
Je suis à l'aide de VIM. Rien à ajouter à cela. L'ensemble de la base de code est représenté ci-dessus. J'essaie de ne pas utiliser n'importe quel type de XCODE ou un autre bâtiment de l'outil. Juste essayer de construire à l'aide de g++ dans la ligne de commande. @Grady Joueur
Essayez de vous ajouter à cela.
-framework FrameworkName
je vous remercie. Il a travaillé...!!!

OriginalL'auteur ILikeTurtles | 2013-11-29