SFML community forums
Help => General => Topic started by: Hawy on June 07, 2009, 08:13:17 pm
-
Hello
When i try to add the following to my program
sf::Sprite test;
It replies
variable 'vtable for sf::Sprite' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
What am I doing wrong.
I can use the following without a problem(that i know of)
sf::RenderWindow App(sf::VideoMode(800, 600), "SFML window");
sf::Image Image;
Image.LoadFromFile("backgrounds/selectscreen.bmp");
-
Read the "getting started" tutorial and stop when you see SFML_DYNAMIC.
-
Read the "getting started" tutorial and stop when you see SFML_DYNAMIC.
Everyone makes this mistake, I did it myself.
Isn't there a way to get it from the compiler configuration? I know it's compiler specific, but there should be a way to avoid this.
Maybe a charitable soul could contribute this? I would if I knew how.
-
There's no way. Static and dynamic builds need different import keywords, I can only make one the default. I can't see any other way than the preprocessor to select the other one. And many other libraries use this solution.
I can't do anything against people who don't read the tutorials or spend 2 minutes to search the forum ;)
-
I had to switch form devc++ to code blocks to get it work =P
-
This is not a solution, you're just hiding the problem.
-
Why am i hiding the problem? :D
I got it to work with codeblocks when i followed the tutorial.I just couldnt find the place to add SFML_DYNAMIC. in devc++.
-
Well, Dev-C++ is kind of dead, there's no reason to choose it over the currently developped IDEs such as Code::Blocks or QtCreator. Plus, there are screenshots in the tutorial for how to setup the project if you use code::Blocks ;)
-
I can't do anything against people who don't read the tutorials or spend 2 minutes to search the forum ;)
Heheh, I was just saying... as I imagined your face answering again and again the same question :D
Maybe an "IMPORTANT READ ME ZOMG!!!1.txt" file in the dlls directories could save you some trouble
:P (just kidding)