Hey, I'm trying to compile the following code:
#include "SFML/Graphics.hpp"
#include "SFML/System.hpp"
#include "AniSprite.h"
int main()
{
sf::RenderWindow App(sf::VideoMode(640, 420,32), "Test");
sf::Image Image;
if (!Image.LoadFromFile("untitled1.bmp"))
return 1;
Image.CreateMaskFromColor(sf::Color::Black);
AniSprite Sprite(Image,93,96);
Sprite.SetLoopSpeed(0.007); //60 fps
while(App.IsOpened())
{
sf::Event Event;
while (App.GetEvent(Event))
{
if (Event.Type == sf::Event::Closed)
App.Close();
if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::A))
Sprite.Play();
else if ((Event.Type == sf::Event::KeyReleased) && (Event.Key.Code == sf::Key::A))
Sprite.Stop();
}
App.Clear();
Sprite.Update();
App.Draw(Sprite);
App.Display();
}
}
and I get
/home/aballofwin/Downloads/frame_anim_animated/sample/main(1).o||In function `main':|
main(1).cpp|| undefined reference to `AniSprite::AniSprite(sf::Image const&, int, int)'|
main(1).cpp|| undefined reference to `AniSprite::SetLoopSpeed(float)'|
main(1).cpp|| undefined reference to `AniSprite::Play()'|
main(1).cpp|| undefined reference to `AniSprite::Stop()'|
main(1).cpp|| undefined reference to `AniSprite::Update()'|
main(1).cpp|| undefined reference to `AniSprite::~AniSprite()'|
main(1).cpp|| undefined reference to `AniSprite::~AniSprite()'|
||=== Build finished: 7 errors, 0 warnings ===|
and I was wondering if there's a linker option I'm missing, or something else?