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

Author Topic: Please help with sprites  (Read 1417 times)

0 Members and 1 Guest are viewing this topic.

Aquacalvin

  • Newbie
  • *
  • Posts: 21
    • View Profile
Please help with sprites
« on: February 21, 2014, 01:28:21 am »
Hello everyone! I have made a few really simple games like a pong clone with SFML, but I am ready for something more exciting. I have been trying to use sprites (as in pictures not sf::circleShape etc.). I follow the proper code and even put the image in the right folder, but when I run the code something weird happens. The console window quickly displays all kinds of ASCII images, and the SFML window does nothing. Suddenly, the windows close and a window comes up. It says something about errors with the memory address. I am lost and really want to continue with SFML. Please help me!

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Please help with sprites
« Reply #1 on: February 21, 2014, 01:58:13 am »
Sounds like the standard problem of incorrect linking. Make sure you are using the same compiler that SFML was compiled with and that you aren't mixing debug/release builds.  ;)
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Aquacalvin

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Please help with sprites
« Reply #2 on: February 21, 2014, 02:03:07 pm »
I am running the program in debug mode. Do I need to run it in Release mode? Also, I did not compile SFML with cMake (or something like it).

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Please help with sprites
« Reply #3 on: February 21, 2014, 02:21:05 pm »
Please use the forum search, this problem appears roughly every week. The problem is always the same: people don't recompile SFML for their compiler, they mix different compiler versions or Release/Debug mode.

If you follow the CMake tutorial carefully and make sure you don't mix configurations, then everything will work fine.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything