C++ & SFML?

Started by
22 comments, last by boogyman19946 10 years, 6 months ago

I'm new to C++ and I wanted to try SFML.

So I downloaded visual studio 2012 and the SFML 2.1 zip file. Extracted it to C:/sfml2.1

And I followed the instructions. I also disabled the 'Precompiled header' option in 'configuration -> C/C++ -> Precompiled headers' as suggested by another thread here on gamedev.

But I'm getting this error:


The program can't start because sfml-system-d-2.dll is missing from your computer. Try reinstall...

Any ideas?

Thanks in advance!

Advertisement

You need that .dll file in your .exe file directory for it to run.

Hm. The tutorial on sfml-dev.org didn't say that.

Where can I find it then?

Do a search on the SFML download for those .dlls. All "-d" files are debug, all without are regular "release" versions.

I found them and it works! ;D

Thanks for the quick reply btw!

You are welcome. Glad I could help. I think there is mention somewhere on the site about the DLLs.

By the way, from the Visual Studio tutorial page:

Now compile the project, and if you linked to the dynamic version of SFML, don't forget to copy the SFML DLLs (they are in <sfml-install-path/bin>) to the directory where your compiled executable is. Then run it, and if everything is ok you should see this:

Oh... I guess my patience is not top notch today :P

It happens. Future reference. It also mentions how to do static linking.

Or just add the bin directory of SFML to the path, then you dont need to copy the dll files every time you make a new project. Just remember users of your program need them.

You can get SFML liked statically to remove the need for dll. Static linking reduces the final size of the program, but possibly makes updates bigger.

I use static linking for convenience.

This topic is closed to new replies.

Advertisement