Okay, so I have a C++ project that uses SFML, and I want to be able to compile it from the CMD using MinGW. I have it so I can compile.cpp's, however, I just need to know what more I have to do in order for it to work with SFML. I tried compiling it with CodeBlocks and MinGW, and it works fine, until I try to run it, at which point it tells me that sfml-system.dll is missing from my computer. Does this mean I installed it incorrectly? I followed the CodeBlocks installation down to the letter, from what I could tell... I put the include\SFML in the include\ of MinGW, and I put all the *.a's from lib\ into the \lib of MinGW as well. Thank you for the help you can give!
2 Answers
Ok, so if it builds well and links with the sfml-system.dll at link time then there is no real problem. All you need to do is copy the sfml-system.dll (or make a link to it) in the directory, where the built .exe file is. That would make the .exe find the required library.
2 Comments
Kyle Martin
Oops... I forgot to update the question last night... I found sfml-system.dll and put that with the directory, but now it can't find something called libgcc_s_dw2-1.dll... I've searched my entire computer for it, and it is nowhere to be found. Any suggestions?
Lyubomir Vasilev
This is part of the MingW compiler libraries. It should be at the place, where MingW is installed. Somewhere in its sub-directories.
libgcc_s_dw2-1.dll is just inside bin folder, on latest MinGW releases.
Copy to .exe folder, it should run.