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

Author Topic: Program has stopped working upon compilation  (Read 2532 times)

0 Members and 1 Guest are viewing this topic.

Shazer2

  • Newbie
  • *
  • Posts: 3
    • View Profile
Program has stopped working upon compilation
« on: June 02, 2013, 08:25:38 am »
Hi all,

I followed this tutorial directly - http://www.sfml-dev.org/tutorials/2.0/start-cb.php and I am still having problems with getting my first application to open properly. I think I linked the libraries incorrectly, but I'm not sure how else to do it. This is my build options:






And the code:



And what happens when I compile:



I hope somebody can help. Thanks :)

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: Program has stopped working upon compilation
« Reply #1 on: June 02, 2013, 09:31:21 am »
I followed this tutorial directly
You didn't read it carefully. There are even parts in red which you have overlooked.
Quote
When linking to multiple SFML libraries, make sure that you link them in the right order, it is very important for gcc.

Static SFML libraries have the "-s" suffix: "sfml-xxx-s-d" for Debug, and "sfml-xxx-s" for Release.

Also, compare your screenshots with those in the tutorial. A lot of things are done differently, for example you don't need to specify the whole path for each library again.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Program has stopped working upon compilation
« Reply #2 on: June 02, 2013, 09:38:46 am »
Which SFML package did you download?
Laurent Gomila - SFML developer

Shazer2

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Program has stopped working upon compilation
« Reply #3 on: June 02, 2013, 10:24:08 am »
I have SFML 2.0. So my debug section for linked libraries is:



Still stops working :( and everything is just as in the tutorial.
« Last Edit: June 02, 2013, 10:37:24 am by Shazer2 »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Program has stopped working upon compilation
« Reply #4 on: June 02, 2013, 11:04:45 am »
I didn't ask which version, but which package. There are several different packages for Windows/gcc, I want to make sure that you picked the right one.
Laurent Gomila - SFML developer

Shazer2

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Program has stopped working upon compilation
« Reply #5 on: June 02, 2013, 11:10:58 am »
Sorry, GCC 4.7 MinGW (DW2) - 32 bits is the package.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Program has stopped working upon compilation
« Reply #6 on: June 02, 2013, 07:04:08 pm »
And what's your compiler? (type "gcc -v" in a console to get the full description)
Laurent Gomila - SFML developer

The Hatchet

  • Full Member
  • ***
  • Posts: 135
    • View Profile
    • Email
Re: Program has stopped working upon compilation
« Reply #7 on: June 06, 2013, 04:46:58 am »
Your Linker settings look like you're pointing to the debug versions "sfml-graphics-d" and not the STATIC debug ones "sfml-graphics-s-d".  Mayhaps that be it?