SFML + Xcode (Mac OS X)



  • Hey ho,

    ich habe mal versucht, SFML in Xcode einzubinden, habe auch die Anleitung befolgt und alles so gemacht wie es da steht. Ich benutze die 64bit-Version. Nichtsdestotrotz bekomme ich insgesamt 12 Errors. Dabei reicht dieser eine, der Rest baut darauf auf:

    error: SFML/Graphics.hpp: No such file or directory

    das ist der include ganz oben von diesem code, der automatisch generiert wird:

    ////////////////////////////////////////////////////////////
    // Headers
    ////////////////////////////////////////////////////////////
    #include <SFML/Graphics.hpp>
    
    ////////////////////////////////////////////////////////////
    /// Entry point of application
    ///
    /// \return Application exit code
    ///
    ////////////////////////////////////////////////////////////
    int main()
    {
        // Create main window
        sf::RenderWindow App(sf::VideoMode(640, 480), "SFML Graphics");
    
        // Start game loop
        while (App.IsOpened())
        {
            // Process events
            sf::Event Event;
            while (App.GetEvent(Event))
            {
                // Close window : exit
                if (Event.Type == sf::Event::Closed)
                    App.Close();
            }
    
            // Clear screen
            App.Clear();
    
            // Draw apredefined shape
            App.Draw(sf::Shape::Circle(200, 200, 100, sf::Color::Yellow, 10, sf::Color::Blue));
    
            // Finally, display the rendered frame on screen
            App.Display();
        }
    
        return EXIT_SUCCESS;
    }
    

    Die Graphics.hpp sitzt im Ordner include. Den ich ja aber laut Anleitung nicht anrühren soll. Was ist also zu tun?



  • Du kannst mal unter den Build Einstellungen nachsehen ob die "Header Search Paths" richtig angegeben sind.



  • Problem hat sich gelöst. Zipeg hat wohl Schwierigkeiten beim entpacken gehabt. Kaum nehme Ich einen anderen Entpacker, geht alles wunderbar.


Anmelden zum Antworten