How to use SFML?

I got SFML last night, and postponed using it until today. Well, I have no idea how to use it. I am using Qt Creator as my IDE, and have placed the extracted SFML MinGW file to the Qt directory. What do I do now?

PS: Should I post this on the Qt forum, or does this question work here?
You should post on the SFML forums in best case scenario. Although, we'll help you as well.

Are you having issues linking against the library or issues using the API?
Thanks, I put one on the Qt forums too, btw :) but I am having trouble linking the library (I don't know what you mean by "against"). I have never used any plugin / outside libraries before. Since you replied, I assume you have knowledge about SFML yourself. So, how did you do it with your IDE?
@ AceDawg45: You could use Visual Studio or Code::Blocks to set up SFML as it's much easier. And also a guide is given for it on the SFML resources. That way, you can at least try it out and then figure out how to set it up in QtCreator later.
Setting up SFML in Visual Studio:
Setting up SFML in Code::Blocks:
Last edited on
It shouldn't be any more difficult than others.

If the SFML library is in the correct path, there should be an option somewhere in QtCreator to add SFML to the linker line. If the compiler gives an error about not being to find the specified library, it's not in the correct path. Alternatively, you can just add your own path. I don't know how to do this specifically in QtCreator but being able to do this is pretty much fundamental in any C/C++ IDE.
As NoXzema says, it's not difficult. In your project file (.pro) use the LIBS variable:

LIBS += -L/path/to/SFML (if not in linker search path) -lsfml-window -lsfml-graphics (etc)
Thanks everybody I got it working! A lot more simple for Qt Creator than for CB, imo.
As far as actual using SFML, it's a pretty well documented API, and most problems I've run into I've been able to solve simply by searching posts already made by the community. Once you get the hang of it, it's very intuitive to use.
Topic archived. No new replies allowed.