I am trying to compile a sfml project via command line under mac osx. Currently, I'm not able to get it to compile. Any help guys?
Asked
Active
Viewed 4,027 times
2 Answers
7
For the simple window application they include as part of the templates. I was able to compile it with the following command.
g++ -framework OpenGL -framework SFML -framework SFML-window main.cpp
I hope that helps

Mirza
- 635
- 1
- 9
- 13
-
This did not work for me. I had to run "g++ -F /Library/Frameworks -c main.cpp" and then "g++ main.o -o main -framework sfml-window -framework sfml-graphics -framework sfml-system" for it to work correctly. Otherwise I got an error with wrong architecture. – Erik Skoglund Oct 20 '12 at 08:11
6
You can compile with only one instruction:
g++ -framework sfml-window -framework sfml-graphics -framework sfml-system main.cpp -o main

satanas
- 706
- 7
- 11