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

Author Topic: Can't get SFML to work in Code::Blocks!  (Read 1624 times)

0 Members and 1 Guest are viewing this topic.

Kain5056

  • Newbie
  • *
  • Posts: 26
    • View Profile
Can't get SFML to work in Code::Blocks!
« on: May 24, 2013, 12:21:09 pm »
I'm trying to Install and Configure SFML to use it with Code::Blocks, but I can't get it to work.

I have followed THIS Tutorial perfectly, but every time I try to run the example program, it crashed giving me this error:

Process terminated with status -1073741819

Also, even though I linked it to the Static version, it still wants the graphics-2, system-2 and window-2 dlls.

I'm not very experienced with programming in general, so if someone could help me to get it to work it would be very appreciated.

Thank you in advance.  :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Can't get SFML to work in Code::Blocks!
« Reply #1 on: May 24, 2013, 12:30:32 pm »
Quote
I have followed THIS Tutorial perfectly, but every time I try to run the example program, it crashed giving me this error:
Which archive of SFML did you download, and which compiler are you using (if you're using the MinGW version provided with Code::Blocks, please tell us which version of Code::Blocks you have)?

Quote
Also, even though I linked it to the Static version, it still wants the graphics-2, system-2 and window-2 dlls.
What did you do to use the static version?
Laurent Gomila - SFML developer

Kain5056

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Can't get SFML to work in Code::Blocks!
« Reply #2 on: May 24, 2013, 01:13:04 pm »
I have downloaded the GCC 4.7 TDM (SJLJ) - 32 bits version of SFML. I have codeblocks-12.11mingw-setup.exe installed, and I use the MinGW version provided with it.

To link it to the Static version, I have added "sfml-graphics-s-d", "sfml-window-s-d" and "sfml-system-s-d" to the Linker settings for the project, "sfml-graphics-s", "sfml-window-s" and "sfml-system-s" for the Release and "sfml-graphics-d", "sfml-window-d" and "sfml-system-d" for the Debug, and also added "SFML_STATIC" in the "#defines" at the Compiler Settings for the project, the Release and the Debug. :-)

EDIT: I finally got it to work perfectly. Turns out all I had to do was to rebuild the project.
I apologize for wasting your time.
« Last Edit: May 24, 2013, 01:21:19 pm by Kain5056 »