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

Author Topic: Frame, Anim, Animated  (Read 2954 times)

0 Members and 1 Guest are viewing this topic.

phux

  • Newbie
  • *
  • Posts: 6
    • View Profile
Frame, Anim, Animated
« on: March 30, 2010, 12:56:02 am »
Hi!
Ive been trying to compile the sample file from Frame, Anim, Animated. Anywho I get these errors:

Quote
main.cpp: In function ‘int main(int, char**)’:
main.cpp:157: error: cannot declare variable ‘boy’ to be of abstract type ‘sftools::Animated’
animated.hpp:66: note:   because the following virtual functions are pure within ‘sftools::Animated’:
/usr/local/include/SFML/Graphics/Drawable.hpp:344: note:    virtual void sf::Drawable::Render(sf::RenderTarget&, sf::Renderer&) const
main.cpp:158: error: ‘class sftools::Animated’ has no member named ‘SetCenter’
animated.cpp: In member function ‘virtual void sftools::Animated::Render(sf::RenderTarget&) const’:
animated.cpp:214: error: ‘const class sf::IntRect’ has no member named ‘GetWidth’
animated.cpp:215: error: ‘const class sf::IntRect’ has no member named ‘GetHeight’
animated.cpp:228: error: ‘GL_QUADS’ was not declared in this scope
animated.cpp:228: error: ‘glBegin’ was not declared in this scope
animated.cpp:229: error: ‘glTexCoord2f’ was not declared in this scope
animated.cpp:230: error: ‘glVertex2f’ was not declared in this scope
animated.cpp:240: error: ‘glEnd’ was not declared in this scope
animated.cpp:245: error: ‘GL_TEXTURE_2D’ was not declared in this scope
animated.cpp:245: error: ‘glDisable’ was not declared in this scope
animated.cpp:248: error: ‘GL_QUADS’ was not declared in this scope
animated.cpp:248: error: ‘glBegin’ was not declared in this scope
animated.cpp:249: error: ‘glVertex2f’ was not declared in this scope
animated.cpp:253: error: ‘glEnd’ was not declared in this scope


What am I doing wrong? Do I miss any lib? Been googling and trying different solutions for 3 days now =O

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Frame, Anim, Animated
« Reply #1 on: March 30, 2010, 08:20:14 am »
This code is not based on SFML 2, that you're using.
Laurent Gomila - SFML developer

panithadrum

  • Sr. Member
  • ****
  • Posts: 304
    • View Profile
    • Skyrpex@Github
    • Email
Frame, Anim, Animated
« Reply #2 on: March 30, 2010, 11:20:28 am »
Include the respective libraries. You aren't do that.

phux

  • Newbie
  • *
  • Posts: 6
    • View Profile
Frame, Anim, Animated
« Reply #3 on: March 30, 2010, 01:25:43 pm »
Quote from: "panithadrum"
Include the respective libraries. You aren't do that.


I belive I am doin that. But if Im doin smth wrong, how would I include the libraries? With linux / gcc

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Frame, Anim, Animated
« Reply #4 on: March 30, 2010, 02:27:20 pm »
You need to include/link to OpenGL (#include <gl/GL.h>, link -lGL). But after updating the code to make it compatible with SFML 2, you won't need it anymore.
Laurent Gomila - SFML developer

phux

  • Newbie
  • *
  • Posts: 6
    • View Profile
Frame, Anim, Animated
« Reply #5 on: March 30, 2010, 03:45:41 pm »
Thx for the answers :) Works fine now

 

anything