programmer47 (12) Aug 29, 2010 at 4:35pm
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:
#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?