I'm running into problem after problem with SFML, but hopefully it will be worth it in the end.
Here's the error:
fatal error: SFML/Graphics.hpp : No such file or directory
and the code:
#include < SFML/Graphics.hpp >
#include < SFML/Window.hpp >
int main(){
sf::RenderWindow Window;
Window.create(sf::VideoMode(800, 600), "SFML");
while(Window.isOpen()){
sf::Event Event;
while(Window.pollEvent(Event)){
if(Event.type == sf::Event::Closed)
Window.close();
}
}
}
You need to tell the compiler where to look for the SFML header files. This can be done by passing the -I
flag in the compiler invocation:
-I/path/to/SFML/headers