Hey all, I'm having some trouble compiling some sfml in the terminal. I have compiled and run sfml in the terminal before, although that was a few months ago, and before i upgraded to El Capitan. I still seem to be able to run Xcode projects just fine; It is nice thought to be able to run small test directly in the terminal.
I'm getting the following error:
mycomputer:sfmltest me$ g++ sfmltest2.cpp -lsfml-system
sfmltest2.cpp:1:10: fatal error: 'SFML/System.hpp' file not found
#include <SFML/System.hpp>
^
1 error generated.
I think i have SFML installed correctly:
- lib is in usr/local/lib
- include is in usr/local/include
- the contents of frameworks and extlibs are in Library/Frameworks
I got info on g++
mycomputer:sfmltest me$ g++ -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.2.0
Thread model: posix
and my $PATH
mycomputer:sfmltest me$ echo $PATH
/Users/me/perl5/perlbrew/bin:/Users/me/perl5/perlbrew/perls/perl-5.16.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
I noticed that my install location wasnt included. Is this a problem? what is the point of the compiler flags -lsfml-system / -framework sfml-system?
I've tried both dylibs and framworks now, and i get the same error. and I'm hoping to get some advice before i go and screw up my default paths.
Thanks,
kipbits