SFML sf::Sprite error
Aug 29, 2010 at 3:35pm UTC
Hi all,
I'm trying to display an image on the screen with SFML (using Dev-C++). An error occurs when I try to declare a sprite with sf::Sprite. This is my code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <SFML/Graphics.hpp>
#include <iostream>
int main()
{
sf::Image image;
if (!image.LoadFromFile("image.tga" ))
{
std::cout << "Error loading image!" << std::endl;
}
sf::Sprite sprite;
sprite.SetImage(image);
return 0;
}
This is the error:
variable 'vtable for sf::Sprite' can't be auto-imported. Please read the documentation for ld' s --enable-auto -import for details.
I have followed the tutorials on SFML-Dev.org, can anyone help prevent this error?
Aug 29, 2010 at 4:49pm UTC
Try asking it on the SFML forum, I think you will have more chance there to get an answer.
Aug 29, 2010 at 5:41pm UTC
I asked about it in the SFML forum and my problem was solved, I missed a stepped in the tutorial (ops).
Topic archived. No new replies allowed.