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

Author Topic: SFML 2.0: Cannot bind static libraries  (Read 1175 times)

0 Members and 2 Guests are viewing this topic.

James_Cupper

  • Newbie
  • *
  • Posts: 2
    • View Profile
SFML 2.0: Cannot bind static libraries
« on: May 29, 2013, 03:32:58 pm »
Hello, I have a problem.
Somehow, since SFML 2.0, I cant bind static libraries anymore. Shared libraries work normally, but I want it to be static. Following errors appear when I try to bind them static:

Quote
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__ReleaseDC@8".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__SetWindowLongA@12" in Funktion ""public: __thiscall sf::priv::WindowImplWin32::WindowImplWin32(struct HWND__ *)" (??0WindowImplWin32@priv@sf@@QAE@PAUHWND__@@@Z)".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__CreateWindowExW@48" in Funktion ""public: __thiscall sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int)" (??0WindowImplWin32@priv@sf@@QAE@VVideoMode@2@ABVString@2@I@Z)".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__AdjustWindowRect@12" in Funktion ""public: __thiscall sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int)" (??0WindowImplWin32@priv@sf@@QAE@VVideoMode@2@ABVString@2@I@Z)".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__UnregisterClassA@8" in Funktion ""public: virtual __thiscall sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UAE@XZ)".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__UnregisterClassW@8" in Funktion ""public: virtual __thiscall sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UAE@XZ)".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__DestroyIcon@4" in Funktion ""public: virtual __thiscall sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UAE@XZ)".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__DispatchMessageA@4" in Funktion ""protected: virtual void __thiscall sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MAEXXZ)".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__TranslateMessage@4" in Funktion ""protected: virtual void __thiscall sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MAEXXZ)".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__PeekMessageA@20" in Funktion ""protected: virtual void __thiscall sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MAEXXZ)".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__GetWindowRect@8" in Funktion ""public: virtual class sf::Vector2<int> __thiscall sf::priv::WindowImplWin32::getPosition(void)const " (?getPosition@WindowImplWin32@priv@sf@@UBE?AV?$Vector2@H@3@XZ)".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__SetWindowPos@28" in Funktion ""public: virtual void __thiscall sf::priv::WindowImplWin32::setPosition(class sf::Vector2<int> const &)" (?setPosition@WindowImplWin32@priv@sf@@UAEXABV?$Vector2@H@3@@Z)".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__GetClientRect@8" in Funktion ""public: virtual class sf::Vector2<unsigned int> __thiscall sf::priv::WindowImplWin32::getSize(void)const " (?getSize@WindowImplWin32@priv@sf@@UBE?AV?$Vector2@I@3@XZ)".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__GetWindowLongA@8" in Funktion ""public: virtual void __thiscall sf::priv::WindowImplWin32::setSize(class sf::Vector2<unsigned int> const &)" (?setSize@WindowImplWin32@priv@sf@@UAEXABV?$Vector2@I@3@@Z)".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__SetWindowTextA@8" in Funktion ""public: virtual void __thiscall sf::priv::WindowImplWin32::setTitle(class sf::String const &)" (?setTitle@WindowImplWin32@priv@sf@@UAEXABVString@3@@Z)".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__SetWindowTextW@8" in Funktion ""public: virtual void __thiscall sf::priv::WindowImplWin32::setTitle(class sf::String const &)" (?setTitle@WindowImplWin32@priv@sf@@UAEXABVString@3@@Z)".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__SendMessageA@16" in Funktion ""public: virtual void __thiscall sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UAEXIIPBE@Z)".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__CreateIcon@28" in Funktion ""public: virtual void __thiscall sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UAEXIIPBE@Z)".
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__SetCursor@4" in Funktion ""public: virtual void __thiscall sf::priv::WindowImplWin32::setMouseCursorVisible(bool)" (?setMouseCursorVisible@WindowImplWin32@priv@sf@@UAEX_N@Z)".

This is just a small part there are lots of other error messages, and at the end:

Quote
1>C:\Users\Jens\Documents\Visual Studio 2010\Projects\PingPong CLR\Debug\Concentration.exe : fatal error LNK1120: 39 nicht aufgelöste externe Verweise.

(Btw: In SFML 1.6 it worked normally...)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: SFML 2.0: Cannot bind static libraries
« Reply #1 on: May 29, 2013, 03:35:17 pm »
Please read the "getting started" tutorial carefully. Hint: SFML_STATIC.
Laurent Gomila - SFML developer

James_Cupper

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: SFML 2.0: Cannot bind static libraries
« Reply #2 on: May 29, 2013, 03:37:48 pm »
I already tried... But didnt work

« Last Edit: May 29, 2013, 03:39:27 pm by James_Cupper »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: SFML 2.0: Cannot bind static libraries
« Reply #3 on: May 29, 2013, 03:40:36 pm »
Your image link is broken.
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: SFML 2.0: Cannot bind static libraries
« Reply #4 on: May 29, 2013, 03:41:59 pm »
Ah sorry, I didn't notice that the unresolved symbols were from system libs, not from SFML libs.

You must add the default system libraries to your project (not manually, there's an option for that but I don't remember it).
Laurent Gomila - SFML developer