Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML Install/1st App  (Read 3145 times)

0 Members and 1 Guest are viewing this topic.

wizard

  • Newbie
  • *
  • Posts: 3
    • View Profile
SFML Install/1st App
« on: August 28, 2014, 02:20:45 am »
Okay so after many trials and tribulations of installing and uninstalling.  I finally came to an error of missing graphics-2.dll from my computer.  Easily solved by copying the sfml dll files to the exe directory of my app.  I know my code is correct because it is the code copied from the sfml 2.1 tutorial for setting up sfml.  The error I get now isn't in the forums anywhere from what I see.  Mind you this is my first sfml attempt at getting an actual on screen work in progress via the tutorial.  Anyway, onward to the error which is attached.


G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: SFML Install/1st App
« Reply #1 on: August 28, 2014, 03:55:34 am »
What version of SFML did you download?
As said in the codeblocks SFML tutorial, the TDM SJLJ is the one you're supposed to use if you're using the compiler shipped with codeblocks.
If it still doesn't work, rebuilding SFML with your compiler would solve it. :p

wizard

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML Install/1st App
« Reply #2 on: August 28, 2014, 04:21:22 am »
Version 2.1 for mingw. I have codeblocks 13.12 MinGW. Though I don't know how to rebuild SFML with my compiler :/. 
« Last Edit: August 28, 2014, 05:33:25 am by wizard »

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: SFML Install/1st App
« Reply #3 on: August 28, 2014, 08:13:54 am »
I don't know how to rebuild SFML with my compiler :/.
The tutorial explains how in great detail: http://sfml-dev.org/tutorials/2.1/compile-with-cmake.php

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: SFML Install/1st App
« Reply #4 on: August 28, 2014, 08:59:23 am »
Version 2.1 for mingw. I have codeblocks 13.12 MinGW. Though I don't know how to rebuild SFML with my compiler :/.
Does that mean you downloaded the "GCC 4.7 MinGW (DW2)" version and not the "GCC 4.7 TDM (SJLJ)" one?

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: SFML Install/1st App
« Reply #5 on: August 28, 2014, 03:11:26 pm »
You can try this nightly build:
http://nightlybuilds.ch/files/download/93/SFML-TDM-471r2-32.7z
It should correspond to the default (non-4.8.1) version of GCC installed with Code::Blocks.

If that doesn't work, you can try this one (4.8.1):
http://nightlybuilds.ch/files/download/92/SFML-TDM-481r3-32.7z

If the second one also doesn't work, just learn to build SFML yourself. It isn't that hard ;).
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

wizard

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML Install/1st App
« Reply #6 on: August 28, 2014, 05:52:13 pm »
Version 2.1 for mingw. I have codeblocks 13.12 MinGW. Though I don't know how to rebuild SFML with my compiler :/.
Does that mean you downloaded the "GCC 4.7 MinGW (DW2)" version and not the "GCC 4.7 TDM (SJLJ)" one?

codeblocks-13.12mingw-setup.exe <-- That is the exact file name of the binary I downloaded from codeblocks.org.

You can try this nightly build:
http://nightlybuilds.ch/files/download/93/SFML-TDM-471r2-32.7z
It should correspond to the default (non-4.8.1) version of GCC installed with Code::Blocks.

If that doesn't work, you can try this one (4.8.1):
http://nightlybuilds.ch/files/download/92/SFML-TDM-481r3-32.7z

If the second one also doesn't work, just learn to build SFML yourself. It isn't that hard ;).

It seems that your 1st suggestion for a nightly build here has worked and resolved my issue.  As far as recompiling SFML with cmake via the tutorial.  I tried on my own just to attempt.  I didn't quite understand the part where it states:

Quote
On Windows, if you want to use gcc (MinGW), you can temporarily add the MinGW\bin directory to the PATH and then run cmake from the command shell:
> set PATH=%PATH%;your_mingw_folder\bin
> cmake

I did try moving past that step even after opening my cmd prompt and typing in those commands.  It inevitably gave me an error as I wasn't fully aware of how or what I was supposed to be doing.  I understand the tutorial to people who have done the proper research is probably sound to them.  However a beginner such as myself is easily lost.  My advice on that is maybe a little more descriptive terms. 

This coming from a 'beginner' who has written a few command line apps in code blocks for C++.  An idea of how beginner I am.  I am currently working on Exceptions in the tutorial on C++ via CPlusPlus.com