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

Author Topic: Probably a noob error  (Read 3488 times)

0 Members and 1 Guest are viewing this topic.

Hawy

  • Newbie
  • *
  • Posts: 8
    • View Profile
Probably a noob error
« on: June 07, 2009, 08:13:17 pm »
Hello

When i try to add the following to my program

Code: [Select]
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)

Code: [Select]
sf::RenderWindow App(sf::VideoMode(800, 600), "SFML window");

 sf::Image Image;
 Image.LoadFromFile("backgrounds/selectscreen.bmp");

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Probably a noob error
« Reply #1 on: June 07, 2009, 08:20:33 pm »
Read the "getting started" tutorial and stop when you see SFML_DYNAMIC.
Laurent Gomila - SFML developer

nitram_cero

  • Full Member
  • ***
  • Posts: 166
    • View Profile
Probably a noob error
« Reply #2 on: June 08, 2009, 06:40:36 pm »
Quote from: "Laurent"
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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Probably a noob error
« Reply #3 on: June 08, 2009, 06:59:20 pm »
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 ;)
Laurent Gomila - SFML developer

Hawy

  • Newbie
  • *
  • Posts: 8
    • View Profile
Probably a noob error
« Reply #4 on: June 09, 2009, 04:32:31 pm »
I had to  switch form devc++ to code blocks to get it work =P

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Probably a noob error
« Reply #5 on: June 09, 2009, 05:09:39 pm »
This is not a solution, you're just hiding the problem.
Laurent Gomila - SFML developer

Hawy

  • Newbie
  • *
  • Posts: 8
    • View Profile
Probably a noob error
« Reply #6 on: June 09, 2009, 05:41:06 pm »
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++.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Probably a noob error
« Reply #7 on: June 09, 2009, 11:26:32 pm »
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 ;)
Laurent Gomila - SFML developer

nitram_cero

  • Full Member
  • ***
  • Posts: 166
    • View Profile
Probably a noob error
« Reply #8 on: June 10, 2009, 05:50:22 pm »
Quote from: "Laurent"

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)

 

anything