by the stash, for the stash
Latest Reviews & Articles
Latest Topic Replies
Here is an easy to follow set of instructions I wrote to help people configure their programming environment for the first time:
INSTALL MinGW "mingw-get-inst-20110802.exe" FROM "sourceforge.net/projects/mingw" WITH "C++ Compiler Suite" SELECTED TO "C:\MinGW"
INSTALL Code::Blocks "codeblocks-10.05-setup.exe" FROM "sourceforge.net/projects/codeblocks" WITH "Full" SELECTED
EXTRACT SFML 1.6 "SFML-1.6-sdk-windows-mingw.zip" FROM "sourceforge.net/projects/sfml" TO "C:\MinGW\include"
MOVE "C:\MinGW\include\SFML-1.6\include\SFML" TO "C:\MinGW\include"
MOVE FILES WITH EXT ".a" FROM "C:\MinGW\include\SFML-1.6\lib" TO "C:\MinGW\lib"
SELECT "Create a new project" THEN SELECT "Console application" THEN SELECT "C++"
SELECT "Project" THEN SELECT "Build options" THEN SELECT "Linker settings"
ADD TO "Link libraries" (most users just need to add "sfml-system", "sfml-window", and "sfml-graphics"; the order does matter)
And, here are some additional tips. If your Code::Blocks program is using an argument driven main function (argv and argc), you can set your runtime arguments via: Project -> "Set programs' arguments". You do not need to re-compile your application if you change arguments, just re-run it. If you would like to test your code quickly, you can press the hotkey "F9" for an instant "Build and run".
Finally, if you would like to run your standalone, release build executable outside of Code::Blocks, you'll need to keep the necessary .DLL files with the application. For a program that uses "sfml-system", "sfml-window", and "sfml-graphics", these .DLL files are necessary (they can be found with SFML or online): libgcc_s_dw2-1, libstdc++-6, sfml-audio, sfml-graphics, sfml-system, sfml-window.
If you need any additional help with SFML, be sure to leave a comment!