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

Author Topic: Static Library Link Errors  (Read 27383 times)

0 Members and 1 Guest are viewing this topic.

BoingBoing

  • Newbie
  • *
  • Posts: 17
    • View Profile
Static Library Link Errors
« Reply #15 on: August 30, 2009, 06:03:53 am »
I change it to yes and there are over 680 errors, which I'm not going to post.

But when it's no I still get the sfml-window-s.lib errors.

I can't compile samples either.
I provide a robust framework.
In my a-

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Static Library Link Errors
« Reply #16 on: August 30, 2009, 09:54:41 am »
You definitely have an issue with your compiler settings.

Let's restart from scratch: download a clean SFML 1.5 SDK, then open the SFML.sln solution and compile one of the samples without doing anything to the projects.
Laurent Gomila - SFML developer

BoingBoing

  • Newbie
  • *
  • Posts: 17
    • View Profile
Static Library Link Errors
« Reply #17 on: August 30, 2009, 10:44:19 am »
Compiled pong.

Code: [Select]
1>------ Build started: Project: sfml-window, Configuration: Release DLL Win32 ------
1>Linking...
1>   Creating library C:\Users\Henry\Documents\Visual Studio 2005\Projects\SFML-1.5\build\vc2005\..\..\lib\vc2005\sfml-window.lib and object C:\Users\Henry\Documents\Visual Studio 2005\Projects\SFML-1.5\build\vc2005\..\..\lib\vc2005\sfml-window.exp
1>VideoModeSupport.obj : error LNK2019: unresolved external symbol __imp__EnumDisplaySettingsA@12 referenced in function "public: static class sf::VideoMode __cdecl sf::priv::VideoModeSupport::GetDesktopVideoMode(void)" (?GetDesktopVideoMode@VideoModeSupport@priv@sf@@SA?AVVideoMode@3@XZ)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__DispatchMessageA@4 referenced in function "private: virtual void __thiscall sf::priv::WindowImplWin32::ProcessEvents(void)" (?ProcessEvents@WindowImplWin32@priv@sf@@EAEXXZ)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function "private: virtual void __thiscall sf::priv::WindowImplWin32::ProcessEvents(void)" (?ProcessEvents@WindowImplWin32@priv@sf@@EAEXXZ)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__PeekMessageA@20 referenced in function "private: virtual void __thiscall sf::priv::WindowImplWin32::ProcessEvents(void)" (?ProcessEvents@WindowImplWin32@priv@sf@@EAEXXZ)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__SwapBuffers@4 referenced in function "private: virtual void __thiscall sf::priv::WindowImplWin32::Display(void)" (?Display@WindowImplWin32@priv@sf@@EAEXXZ)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__SetCursor@4 referenced in function "private: virtual void __thiscall sf::priv::WindowImplWin32::ShowMouseCursor(bool)" (?ShowMouseCursor@WindowImplWin32@priv@sf@@EAEX_N@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__LoadCursorA@8 referenced in function "private: virtual void __thiscall sf::priv::WindowImplWin32::ShowMouseCursor(bool)" (?ShowMouseCursor@WindowImplWin32@priv@sf@@EAEX_N@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__SetCursorPos@8 referenced in function "private: virtual void __thiscall sf::priv::WindowImplWin32::SetCursorPosition(unsigned int,unsigned int)" (?SetCursorPosition@WindowImplWin32@priv@sf@@EAEXII@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__ClientToScreen@8 referenced in function "private: virtual void __thiscall sf::priv::WindowImplWin32::SetCursorPosition(unsigned int,unsigned int)" (?SetCursorPosition@WindowImplWin32@priv@sf@@EAEXII@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__SetWindowPos@28 referenced in function "private: virtual void __thiscall sf::priv::WindowImplWin32::SetPosition(int,int)" (?SetPosition@WindowImplWin32@priv@sf@@EAEXHH@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__AdjustWindowRect@12 referenced in function "private: virtual void __thiscall sf::priv::WindowImplWin32::SetSize(unsigned int,unsigned int)" (?SetSize@WindowImplWin32@priv@sf@@EAEXII@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__GetWindowLongA@8 referenced in function "private: virtual void __thiscall sf::priv::WindowImplWin32::SetSize(unsigned int,unsigned int)" (?SetSize@WindowImplWin32@priv@sf@@EAEXII@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function "private: virtual void __thiscall sf::priv::WindowImplWin32::Show(bool)" (?Show@WindowImplWin32@priv@sf@@EAEX_N@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__ReleaseDC@8 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::Cleanup(void)" (?Cleanup@WindowImplWin32@priv@sf@@AAEXXZ)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__ChangeDisplaySettingsA@8 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::Cleanup(void)" (?Cleanup@WindowImplWin32@priv@sf@@AAEXXZ)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__GetAsyncKeyState@4 referenced in function "private: static enum sf::Key::Code __cdecl sf::priv::WindowImplWin32::GetShiftState(bool)" (?GetShiftState@WindowImplWin32@priv@sf@@CA?AW4Code@Key@3@_N@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__SetWindowLongA@12 referenced in function "public: virtual __thiscall sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UAE@XZ)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__UnregisterClassA@8 referenced in function "public: virtual __thiscall sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UAE@XZ)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__UnregisterClassW@8 referenced in function "public: virtual __thiscall sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UAE@XZ)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__DestroyWindow@4 referenced in function "public: virtual __thiscall sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UAE@XZ)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__DestroyIcon@4 referenced in function "public: virtual __thiscall sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UAE@XZ)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__TrackMouseEvent@4 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::ProcessEvent(unsigned int,unsigned int,long)" (?ProcessEvent@WindowImplWin32@priv@sf@@AAEXIIJ@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__GetClientRect@8 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::ProcessEvent(unsigned int,unsigned int,long)" (?ProcessEvent@WindowImplWin32@priv@sf@@AAEXIIJ@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__DefWindowProcA@16 referenced in function "private: static long __stdcall sf::priv::WindowImplWin32::GlobalOnEvent(struct HWND__ *,unsigned int,unsigned int,long)" (?GlobalOnEvent@WindowImplWin32@priv@sf@@CGJPAUHWND__@@IIJ@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__DefWindowProcW@16 referenced in function "private: static long __stdcall sf::priv::WindowImplWin32::GlobalOnEvent(struct HWND__ *,unsigned int,unsigned int,long)" (?GlobalOnEvent@WindowImplWin32@priv@sf@@CGJPAUHWND__@@IIJ@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__CallWindowProcA@20 referenced in function "private: static long __stdcall sf::priv::WindowImplWin32::GlobalOnEvent(struct HWND__ *,unsigned int,unsigned int,long)" (?GlobalOnEvent@WindowImplWin32@priv@sf@@CGJPAUHWND__@@IIJ@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__RegisterClassA@4 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::RegisterWindowClass(void)" (?RegisterWindowClass@WindowImplWin32@priv@sf@@AAEXXZ)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__RegisterClassW@4 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::RegisterWindowClass(void)" (?RegisterWindowClass@WindowImplWin32@priv@sf@@AAEXXZ)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__SetPixelFormat@12 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::CreateContext(class sf::VideoMode const &,struct sf::WindowSettings &)" (?CreateContext@WindowImplWin32@priv@sf@@AAEXABVVideoMode@3@AAUWindowSettings@3@@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__ChoosePixelFormat@8 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::CreateContext(class sf::VideoMode const &,struct sf::WindowSettings &)" (?CreateContext@WindowImplWin32@priv@sf@@AAEXABVVideoMode@3@AAUWindowSettings@3@@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__DescribePixelFormat@16 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::CreateContext(class sf::VideoMode const &,struct sf::WindowSettings &)" (?CreateContext@WindowImplWin32@priv@sf@@AAEXABVVideoMode@3@AAUWindowSettings@3@@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__GetDC@4 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::CreateContext(class sf::VideoMode const &,struct sf::WindowSettings &)" (?CreateContext@WindowImplWin32@priv@sf@@AAEXABVVideoMode@3@AAUWindowSettings@3@@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__CreateWindowExA@48 referenced in function "public: __thiscall sf::priv::WindowImplWin32::WindowImplWin32(void)" (??0WindowImplWin32@priv@sf@@QAE@XZ)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__CreateWindowExW@48 referenced in function "public: __thiscall sf::priv::WindowImplWin32::WindowImplWin32(void)" (??0WindowImplWin32@priv@sf@@QAE@XZ)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__GetDeviceCaps@8 referenced in function "public: __thiscall sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned long,struct sf::WindowSettings &)" (??0WindowImplWin32@priv@sf@@QAE@VVideoMode@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KAAUWindowSettings@2@@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__SendMessageA@16 referenced in function "private: virtual void __thiscall sf::priv::WindowImplWin32::SetIcon(unsigned int,unsigned int,unsigned char const *)" (?SetIcon@WindowImplWin32@priv@sf@@EAEXIIPBE@Z)
1>WindowImplWin32.obj : error LNK2019: unresolved external symbol __imp__CreateIcon@28 referenced in function "private: virtual void __thiscall sf::priv::WindowImplWin32::SetIcon(unsigned int,unsigned int,unsigned char const *)" (?SetIcon@WindowImplWin32@priv@sf@@EAEXIIPBE@Z)
1>C:\Users\Henry\Documents\Visual Studio 2005\Projects\SFML-1.5\build\vc2005\..\..\lib\vc2005\sfml-window.dll : fatal error LNK1120: 37 unresolved externals
1>Build log was saved at "file://C:\Users\Henry\Documents\Visual Studio 2005\Projects\SFML-1.5\Temp\sfml-window\Release DLL\BuildLog.htm"
1>sfml-window - 38 error(s), 0 warning(s)
2>------ Build started: Project: sfml-graphics, Configuration: Release DLL Win32 ------
2>Linking...
2>   Creating library C:\Users\Henry\Documents\Visual Studio 2005\Projects\SFML-1.5\build\vc2005\..\..\lib\vc2005\sfml-graphics.lib and object C:\Users\Henry\Documents\Visual Studio 2005\Projects\SFML-1.5\build\vc2005\..\..\lib\vc2005\sfml-graphics.exp
2>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
2>Embedding manifest...
2>Build log was saved at "file://C:\Users\Henry\Documents\Visual Studio 2005\Projects\SFML-1.5\Temp\sfml-graphics\Release DLL\BuildLog.htm"
2>sfml-graphics - 0 error(s), 1 warning(s)
3>------ Build started: Project: pong, Configuration: Release Win32 ------
3>Linking...
3>Pong.obj : error LNK2019: unresolved external symbol "private: static unsigned int * sf::Font::ourDefaultCharset" (?ourDefaultCharset@Font@sf@@0PAIA) referenced in function _main
3>c:\Users\Henry\Documents\Visual Studio 2005\Projects\SFML-1.5\samples\build\vc2005\..\..\bin\pong.exe : fatal error LNK1120: 1 unresolved externals
3>Build log was saved at "file://C:\Users\Henry\Documents\Visual Studio 2005\Projects\SFML-1.5\Temp\pong\Release\BuildLog.htm"
3>pong - 2 error(s), 0 warning(s)
========== Build: 1 succeeded, 2 failed, 3 up-to-date, 0 skipped ==========


I tried it with the other Solution Configurations first until I got to Release DLL and Debug DLL which seem to want to compile the others.
I provide a robust framework.
In my a-

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Static Library Link Errors
« Reply #18 on: August 30, 2009, 08:34:44 pm »
It's like you have a global compiler setting which forces it to ignore the standard Windows libraries.
Laurent Gomila - SFML developer

BoingBoing

  • Newbie
  • *
  • Posts: 17
    • View Profile
Static Library Link Errors
« Reply #19 on: August 30, 2009, 09:24:47 pm »
I switched to Code::Blocks,
no more errors.  :P

For some reason Code::Blocks doesn't want to compile now.

Code: [Select]

-------------- Build: Release DLL_Win32 in sfml-system ---------------

Compiling: ..\..\src\SFML\System\Lock.cpp
Compiling: ..\..\src\SFML\System\Randomizer.cpp
C:\Users\Henry\Documents\trunk\src\SFML\System\Randomizer.cpp:50: error: `unsigned int sf::Randomizer::ourSeed' is not a static member of `class sf::Randomizer'
C:\Users\Henry\Documents\trunk\src\SFML\System\Randomizer.cpp: In static member function `static void sf::Randomizer::SetSeed(unsigned int)':
C:\Users\Henry\Documents\trunk\src\SFML\System\Randomizer.cpp:60: error: `ourSeed' was not declared in this scope
C:\Users\Henry\Documents\trunk\src\SFML\System\Randomizer.cpp:60: warning: unused variable 'ourSeed'
C:\Users\Henry\Documents\trunk\src\SFML\System\Randomizer.cpp: In static member function `static unsigned int sf::Randomizer::GetSeed()':
C:\Users\Henry\Documents\trunk\src\SFML\System\Randomizer.cpp:69: error: `ourSeed' was not declared in this scope
C:\Users\Henry\Documents\trunk\src\SFML\System\Randomizer.cpp:69: warning: unused variable 'ourSeed'
Process terminated with status 1 (0 minutes, 0 seconds)
3 errors, 2 warnings
 


It compiled system.lib earlier and I didn't make any changes.
I provide a robust framework.
In my a-

 

anything