reviewstash

by the stash, for the stash

Guest Information

Reviewstash isn't just another technology review website - it's your review website! Registered members can submit reviews to be featured on the home page, participate in contests, and ask questions in the forums - register today to get started! Registration also removes interstitial ads.
  • Forum
  •  » News
  •  » SFML, Code::Blocks, and MinGW; Configuration/Setup
Topic rating: 0

#1 11/13/11 8:46 AM

Daniel Levy's Avatar
Daniel Levy United States
Staff
Gender: male
From: Sacramento / Santa Barbara, CA
Registered: 12/08/07
Posts: 6985
Karma: 77
Note: UTF Spokesman
Reputation :   154 

Website

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"
EXECUTE Code::Blocks
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!

 
 
 

11/13/11 8:46 AM

Advertisement Bot


  • Forum
  •  » News
  •  » SFML, Code::Blocks, and MinGW; Configuration/Setup

Board footer

Optimized for 1280x1024 @ 32 bit
Fueled by FluxBB
Top 20 Posts
Who's Online
Index Map
About Us