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

Author Topic: sfml 1.6 sprite::GetSize equivalent? and general 2.0 questions  (Read 21671 times)

0 Members and 1 Guest are viewing this topic.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: sfml 1.6 sprite::GetSize equivalent? and general 2.0 questions
« Reply #45 on: August 21, 2012, 03:52:48 pm »
I am pretty sure that I have setup SFML 2.0 incorrectly, because I am getting some 13 linking errors.
If you follow the tutorial step by step it should work. ;)

Should you or should you not "compile" sfml 2.0 rc with cmake? If so how? When I tried to, I got this error:
CMake Error: The source directory "C:/Users/Admin/Desktop/Small Game/SFML-2.0-rc" does not appear to contain CMakeLists.txt.
You either use the provided binaries with the SFML RC release or you get the source and build it yourself.
If you want to build SFML on your own with CMake then you'll have to get the source directly from GitHub. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

natchos

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
    • Email
Re: sfml 1.6 sprite::GetSize equivalent? and general 2.0 questions
« Reply #46 on: August 21, 2012, 04:36:42 pm »
Fixed :D I'm so close to it compiling ( I think).
One last error (I think).

1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall Randomizer::~Randomizer(void)" (??1Randomizer@@QAE@XZ) referenced in function "void __cdecl `dynamic atexit destructor for 'theRandom''(void)" (??__FtheRandom@@YAXXZ)

I have no clue what the error message is supposed to tell me.
Randomizer is my own class which I constructed to generate random numbers.
The words "dynamic atexit destructor" had me thinking that the fault was in the destructor function, but it seems fine to me(it's just an empty destructor).

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: sfml 1.6 sprite::GetSize equivalent? and general 2.0 questions
« Reply #47 on: August 21, 2012, 04:40:07 pm »
The problem is although you declare a destructor you don't define it. Your code looks like this:
~Randomizer();
Now either you just delete it, since it isn't needed anyways and the compiler will generate a default destructor or you change to:
~Randomizer() {}
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

natchos

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
    • Email
Re: sfml 1.6 sprite::GetSize equivalent? and general 2.0 questions
« Reply #48 on: August 21, 2012, 04:55:36 pm »
The problem is although you declare a destructor you don't define it. Your code looks like this:
~Randomizer();
Now either you just delete it, since it isn't needed anyways and the compiler will generate a default destructor or you change to:
~Randomizer() {}

Aye I thought of that first and changed it into
~Randomizer() {}
it still doesn't work.

EDIT: Also tried deleting it. Didn't work either.

natchos

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
    • Email
Re: sfml 1.6 sprite::GetSize equivalent? and general 2.0 questions
« Reply #49 on: August 21, 2012, 05:00:52 pm »
Whelp, I changed from linking to static to linking to dynamic. That fixed it.