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

Author Topic: SFML 1.6 to 2.0  (Read 3969 times)

0 Members and 1 Guest are viewing this topic.

vidjogamer

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
SFML 1.6 to 2.0
« on: March 08, 2011, 08:42:19 am »
I tried converting my project from 1.6 to 2.0 today.
These are some of the errors im getting. It seems to not like a lot of Sound related code.  Anyone have any ideas?

Also does the graphics package not include the gl headers anymore?

1>PhysicsManager.obj : error LNK2019: unresolved external symbol "public: __thiscall DebugDraw::DebugDraw(class sf::RenderWindow *)" (??0DebugDraw@@QAE@PAVRenderWindow@sf@@@Z) referenced in function "public: __thiscall PhysicsManager::PhysicsManager(void)" (??0PhysicsManager@@QAE@XZ)
1>ResourceManager.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::SoundBuffer::LoadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?LoadFromFile@SoundBuffer@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: void __thiscall ResourceManager::loadAllSounds(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?loadAllSounds@ResourceManager@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>ResourceManager.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::SoundBuffer::SoundBuffer(void)" (__imp_??0SoundBuffer@sf@@QAE@XZ) referenced in function "public: void __thiscall ResourceManager::loadAllSounds(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?loadAllSounds@ResourceManager@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>Scene.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Music::~Music(void)" (__imp_??1Music@sf@@UAE@XZ) referenced in function __unwindfunclet$??0Scene@@QAE@XZ$0
1>Scene.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Music::OpenFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?OpenFromFile@Music@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: __thiscall Scene::Scene(void)" (??0Scene@@QAE@XZ)
1>Scene.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::SoundStream::SetLoop(bool)" (__imp_?SetLoop@SoundStream@sf@@QAEX_N@Z) referenced in function "public: __thiscall Scene::Scene(void)" (??0Scene@@QAE@XZ)
1>Scene.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Music::Music(void)" (__imp_??0Music@sf@@QAE@XZ) referenced in function "public: __thiscall Scene::Scene(void)" (??0Scene@@QAE@XZ)
1>SoundSystem.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Sound::Play(void)" (__imp_?Play@Sound@sf@@QAEXXZ) referenced in function "public: void __thiscall SoundSystem::update(class Scene *)" (?update@SoundSystem@@QAEXPAVScene@@@Z)
1>Player1ControllerComponent.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Sound::SetBuffer(class sf::SoundBuffer const &)" (__imp_?SetBuffer@Sound@sf@@QAEXABVSoundBuffer@2@@Z) referenced in function "public: __thiscall Player1ControllerComponent::Player1ControllerComponent(class b2Body *,class InputManager &,class ResourceManager &,class SoundSystem &)" (??0Player1ControllerComponent@@QAE@PAVb2Body@@AAVInputManager@@AAVResourceManager@@AAVSoundSystem@@@Z)
1>Player1ControllerComponent.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Sound::Sound(void)" (__imp_??0Sound@sf@@QAE@XZ) referenced in function "public: __thiscall Player1ControllerComponent::Player1ControllerComponent(class b2Body *,class InputManager &,class ResourceManager &,class SoundSystem &)" (??0Player1ControllerComponent@@QAE@PAVb2Body@@AAVInputManager@@AAVResourceManager@@AAVSoundSystem@@@Z)
1>Player1ControllerComponent.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Sound::~Sound(void)" (__imp_??1Sound@sf@@UAE@XZ) referenced in function "public: virtual void * __thiscall sf::Sound::`scalar deleting destructor'(unsigned int)" (??_GSound@sf@@UAEPAXI@Z)
1>C:\Documents and Settings\Administrator\Desktop\GameEngine\branches\EngineRefactorSFML2\build\Debug\AdventureGun.exe : fatal error LNK1120: 11 unresolved externals

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML 1.6 to 2.0
« Reply #1 on: March 08, 2011, 09:07:37 am »
Can you show the list of SFML libraries that you link to?

Quote
Also does the graphics package not include the gl headers anymore?

Indeed. You must now include <SFML/OpenGL.hpp>.
Laurent Gomila - SFML developer

vidjogamer

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
SFML 1.6 to 2.0
« Reply #2 on: March 08, 2011, 09:38:07 am »
Awesome my GL code compiles now =)

These are the libraries im linking to:

lib\Release\sfml-system-s.lib
lib\Release\sfml-graphics-s.lib
lib\Release\sfml-window-s.lib
lib\Release\sfml-audio-s.lib

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML 1.6 to 2.0
« Reply #3 on: March 08, 2011, 09:38:38 am »
You must define SFML_STATIC in your preprocessor options.
Laurent Gomila - SFML developer

vidjogamer

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
SFML 1.6 to 2.0
« Reply #4 on: March 08, 2011, 09:43:50 am »
Worked like a charm. Cant believe I missed that. :oops:

Thanks for your help. =)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML 1.6 to 2.0
« Reply #5 on: March 08, 2011, 10:29:27 am »
Quote
Cant believe I missed that

Well... I don't think it is explained anywhere ;)
Laurent Gomila - SFML developer