SFML Code::Blocks Problem

I am setting up SFML with Code::Blocks for future use and I see to be getting an error.

During the set-up project, I've selected the file where all the SFML stuff is for the path and I get the following error.

The path you entered seems valid, but your wizard can't locate the following SFML's include file: Audio.hpp in it.

After checking the path, I have found Audio.hpp in the Include folder. How can I fix this?
Last edited on
Don't use the template, make your own one!
Just create an empty project, then add the libraries to be linked yourself. Also, in case you aren't already, you should use SFML 2.0. You'll have to build the binaries yourself, but there's no point learning the old version at this stage.

You should be able to find a setup tutorial on the official website. You can also find mine (see the link on my profile) for building the binaries, but don't use my 'first project' tutorials as they are in serious need of improvement.

To build the binaries:
Official - http://sfml-dev.org/tutorials/2.0/compile-with-cmake.php
If Laurent's tutorial leaves anything you are unsure of, you can check out mine:
Text - http://sfmlcoder.wordpress.com/2011/06/16/building-sfml-2-0-with-mingw-make/
Video - http://www.youtube.com/watch?v=U1zN_QRSwxw

To create a project:
Basically, go to Settings -> Compiler and Debugger -> Global Compiler Settings -> Search Directories, and you can add the header file path under the 'Compiler' sub-tab and the library file path under the 'Linker' sub-tab.

Then create an empty project and go to Project -> Build Options. Check "Have g++ follow the coming C++0x ISO C++ language standard [-std=c++0x]" (as SFML uses long long integers, a feature of C++0x/C++11).

Then change the target to 'Debug' on the left hand side, go to 'Linker settings' and use the 'Add' button to add the following entries to the 'Link Libraries' pane:
-> sfml-graphics-d.lib
-> sfml-window-d.lib
-> sfml-audio-d.lib
-> sfml-network-d.lib
-> sfml-system-d.lib

Finally, change the target to 'Release' on the left and add the following libraries in the same way:
-> sfml-graphics.lib
-> sfml-window.lib
-> sfml-audio.lib
-> sfml-network.lib
-> sfml-system.lib

Do this, and see how you go. There are a few subtleties, but do this much (or try, at least) and then ask any further questions you might have.

EDIT EDIT: If you'd like to link SFML statically, feel free to ask how.
Last edited on
Topic archived. No new replies allowed.