News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

SFML with CodeBlocks 16.01

Started by nguyendohuuduc, October 08, 2016, 06:02:11 PM

Previous topic - Next topic

nguyendohuuduc

I'm a newbie programmer and having trouble with linking codeblocks 16.01 with the SFML library to the graphics. I have tried multiple guides and multiple versions of sfml but all of them do not work. I'm also using Windows 8 64-bit. The compiler I'm using come with codeblocks by default. Any instruction on how to link the correct version of sfml to codeblocks would be appreciated.

stahta01

#1
Are you using the Code::Blocks (CB) wizard to create the CB project?
Or, are you doing it manually?

Where did you get the SFML library? What version?
Edit: Working on trying it using SFML-2.4.0-windows-gcc-4.9.2-tdm-32-bit and setting up the CB project manually.

I will likely ask you to post a build log in the future. http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Edit: I have NOT used the SFML library (other maybe testing a CB wizard), before.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

#2
Hand created a project using sample code from here http://www.sfml-dev.org/tutorials/2.4/start-cb.php

You need to be using the TDM's 32 bit GCC 4.9.2 (SJLJ) that was packaged with "codeblocks-16.01mingw-setup.exe".

You need to have downloaded and unzipped "SFML-2.4.0-windows-gcc-4.9.2-tdm-32-bit.zip"

Open up Code::Blocks and setup CB Global variable "sfml" so base points to sfml folder containing sub folders include,lib, and bin.

The after unzipping attached sfml_gcc492.zip open the CB project.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]