'SFML/Audio.hpp' file not found ?

closed account (j1CpDjzh)
I am using SFML for the very first time, and I have no idea why I'm getting this error. I'm pretty sure I installed it correctly, so why is this occurring, and how do I fix it? Thank you so much for your replies in advance!
Last edited on
If you are compiling with gcc, then use the option -I/some/include/path to tell the compiler where are your includes. If you are on Linux, then use your package manager to install SFML (for example, pacman -S sfml on Arch) and you don't need to tell gcc where the includes are, because they are on the standard path. This can be a problem if you installed SFML in ~/SFML-2.1 and you added ~/SFML-2.1/include/SFML to your include path, because SFML-2.1/include contains SFML which contains Audio.hpp, Graphics.hpp etc. You must add /some/include/path/SFML-2.1/include to your include path.
On Windows/Visual studio copy your include\SFML folder to C:\Program files\Microsoft Visual studio 1x.0\VC\include (replace 1x with your VS version), and include it normally from code. You will also need to copy SFML-2.1\lib folder CONTENTS to C:\program files\Microsoft Visual studio 1x.0\VC\lib. If you don't, you will get some really annoying linker errors.
closed account (j1CpDjzh)
Thank you both so much. It turns out I had messed up a bit because I didn't realize that it had to be installed differently for Xcode 5. I'm still having some trouble though, because I've never installed an external library before, so I'm not very familiar on how to.
Topic archived. No new replies allowed.