SFML community forums

Help => General => Topic started by: Makuto on February 10, 2011, 03:04:21 pm

Title: --enable-auto-import
Post by: Makuto on February 10, 2011, 03:04:21 pm
I keep getting an error saying "C:/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_construct.h: variable 'vtable for sf::Sprite' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
collect2: ld returned 1 exit status."  I've linked to SFML_DYNAMIC, but I still can't get it to work.  I'm using Code::Blocks.
Title: --enable-auto-import
Post by: Laurent on February 10, 2011, 03:20:54 pm
Quote
I've linked to SFML_DYNAMIC

You probably do it wrong (it has nothing to do with "linking", it's a preprocessor symbol that you have to define). Make sure that you do exactly as in the tutorial.
Title: --enable-auto-import
Post by: Makuto on February 11, 2011, 12:44:00 am
I followed the tutorial again, and still got nothing.  Are there any other things I can do to get this to work?
Title: --enable-auto-import
Post by: Laurent on February 11, 2011, 08:03:23 am
Tell us exactly how you did.
Title: --enable-auto-import
Post by: Makuto on February 11, 2011, 02:42:28 pm
First, I added the search directories for the compiler and linker, then I typed in the linker settings "-lsfml-graphics-lsfml-window-lsfml-system," then I went to the #defines and added "SFML_DYNAMIC."
Is there a way that I can define it in the actual code?
Title: --enable-auto-import
Post by: devlin on February 11, 2011, 05:51:19 pm
Was this part:
"-lsfml-graphics-lsfml-window-lsfml-system,"

copy-pasted?

If so, you're lacking spaces between the libraries and have a comma too much at the end.

like this:

"-lsfml-graphics -lsfml-window -lsfml-system"
Title: --enable-auto-import
Post by: Makuto on February 11, 2011, 09:25:12 pm
There is no comma, and I hit enter after each one.
Title: --enable-auto-import
Post by: Makuto on February 12, 2011, 06:04:47 am
Figured it out.  You need to put the SFML_DYNAMIC in all of the tabs, not just #defines.  It works great now!  :)
Oh, and sorry for all the trouble!