Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: --enable-auto-import  (Read 4182 times)

0 Members and 1 Guest are viewing this topic.

Makuto

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • Au 79 Games
    • Email
--enable-auto-import
« 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.
Macoy Madson-Au 79 Games
Check out my work at http://augames.f11.us/
Most of my SFML-related code is here: https://github.com/makuto/personal/tree/master/gameDev/resources/base2.0
I try to KIS(S), do you?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
--enable-auto-import
« Reply #1 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.
Laurent Gomila - SFML developer

Makuto

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • Au 79 Games
    • Email
--enable-auto-import
« Reply #2 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?
Macoy Madson-Au 79 Games
Check out my work at http://augames.f11.us/
Most of my SFML-related code is here: https://github.com/makuto/personal/tree/master/gameDev/resources/base2.0
I try to KIS(S), do you?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
--enable-auto-import
« Reply #3 on: February 11, 2011, 08:03:23 am »
Tell us exactly how you did.
Laurent Gomila - SFML developer

Makuto

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • Au 79 Games
    • Email
--enable-auto-import
« Reply #4 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?
Macoy Madson-Au 79 Games
Check out my work at http://augames.f11.us/
Most of my SFML-related code is here: https://github.com/makuto/personal/tree/master/gameDev/resources/base2.0
I try to KIS(S), do you?

devlin

  • Full Member
  • ***
  • Posts: 128
    • View Profile
--enable-auto-import
« Reply #5 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"

Makuto

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • Au 79 Games
    • Email
--enable-auto-import
« Reply #6 on: February 11, 2011, 09:25:12 pm »
There is no comma, and I hit enter after each one.
Macoy Madson-Au 79 Games
Check out my work at http://augames.f11.us/
Most of my SFML-related code is here: https://github.com/makuto/personal/tree/master/gameDev/resources/base2.0
I try to KIS(S), do you?

Makuto

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • Au 79 Games
    • Email
--enable-auto-import
« Reply #7 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!
Macoy Madson-Au 79 Games
Check out my work at http://augames.f11.us/
Most of my SFML-related code is here: https://github.com/makuto/personal/tree/master/gameDev/resources/base2.0
I try to KIS(S), do you?