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

Author Topic: Hundreds of linker warnings  (Read 7500 times)

0 Members and 1 Guest are viewing this topic.

mitchgc

  • Newbie
  • *
  • Posts: 27
    • View Profile
Hundreds of linker warnings
« on: December 18, 2009, 11:32:02 pm »
Hey.

I was compiling my static library project that uses SFML fine until I added a #include "SFML/Config.hpp" (to gain access to the typedefs there). It gave me hundreds of linker warnings similar to the ones below, so I removed the #include and used my own typedefs.

Code: [Select]
Warning 21 warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 22 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-s-d.lib
Warning 23 warning LNK4006: __IMPORT_DESCRIPTOR_OPENGL32 already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 24 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-s-d.lib
Warning 25 warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 26 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-s-d.lib
Warning 27 warning LNK4006: OPENGL32_NULL_THUNK_DATA already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 28 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-s-d.lib
Warning 29 warning LNK4006: _GlmfBeginGlsBlock@4 already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 30 warning LNK4006: __imp__GlmfBeginGlsBlock@4 already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 31 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-s-d.lib
Warning 32 warning LNK4006: _GlmfCloseMetaFile@4 already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 33 warning LNK4006: __imp__GlmfCloseMetaFile@4 already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 34 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-s-d.lib
Warning 35 warning LNK4006: _GlmfEndGlsBlock@4 already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 36 warning LNK4006: __imp__GlmfEndGlsBlock@4 already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 37 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-s-d.lib
Warning 38 warning LNK4006: _GlmfEndPlayback@4 already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 39 warning LNK4006: __imp__GlmfEndPlayback@4 already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 40 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-s-d.lib
Warning 41 warning LNK4006: _GlmfInitPlayback@12 already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 42 warning LNK4006: __imp__GlmfInitPlayback@12 already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 43 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-s-d.lib
Warning 44 warning LNK4006: _GlmfPlayGlsRecord@16 already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 45 warning LNK4006: __imp__GlmfPlayGlsRecord@16 already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 46 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-s-d.lib
Warning 47 warning LNK4006: _glAccum@8 already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 48 warning LNK4006: __imp__glAccum@8 already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 49 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-s-d.lib
Warning 50 warning LNK4006: _glAlphaFunc@8 already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib
Warning 51 warning LNK4006: __imp__glAlphaFunc@8 already defined in sfml-graphics-s-d.lib(OPENGL32.dll); second definition ignored sfml-window-s-d.lib


C++ settings:
Code: [Select]
/Od /I "C:\Dev\SFML\include" /I "C:\Dev\tinyxml++" /I "C:\Dev\boost" /I "C:\Dev\GM\src\binds" /I "C:\Dev\GM\src\gm" /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Yu"stdafx.h" /Fp"Debug\Crumbs_d.pch" /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /nologo /c /Wp64 /ZI /TP /errorReport:prompt

Linker settings:
Code: [Select]
/OUT:"C:\Documents and Settings\Bill\My Documents\Visual Studio 2005\Projects\Crumbs\Debug\Crumbs_d.lib" /LIBPATH:"C:\Dev\SFML\lib\vc2005" /LIBPATH:"C:\Dev\boost\lib" /LIBPATH:"C:\Dev\tinyxml++\lib" /LIBPATH:"C:\Dev\GM\bin" /NOLOGO ticppd.lib gm_d.lib sfml-system-s-d.lib sfml-graphics-s-d.lib sfml-window-s-d.lib

Does anyone know why this is happening?


Cheers.

mitchgc

  • Newbie
  • *
  • Posts: 27
    • View Profile
Hundreds of linker warnings
« Reply #1 on: December 19, 2009, 05:11:16 am »
If I use the (non-static?) SFML libs below, I get less warnings but they're mentioning Unicode, which I am not and do not want to be using...

Code: [Select]
sfml-system-d.lib sfml-graphics-d.lib sfml-window-d.lib

Code: [Select]
Warning 1 warning LNK4006: "public: class sf::Unicode & __thiscall sf::Unicode::operator=(class sf::Unicode const &)" (??4Unicode@sf@@QAEAAV01@ABV01@@Z) already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-graphics-d.lib
Warning 2 warning LNK4006: "__declspec(dllimport) public: class sf::Unicode & __thiscall sf::Unicode::operator=(class sf::Unicode const &)" (__imp_??4Unicode@sf@@QAEAAV01@ABV01@@Z) already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-graphics-d.lib
Warning 3 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-graphics-d.lib
Warning 4 warning LNK4006: "public: class sf::Unicode::Text & __thiscall sf::Unicode::Text::operator=(class sf::Unicode::Text const &)" (??4Text@Unicode@sf@@QAEAAV012@ABV012@@Z) already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-graphics-d.lib
Warning 5 warning LNK4006: "__declspec(dllimport) public: class sf::Unicode::Text & __thiscall sf::Unicode::Text::operator=(class sf::Unicode::Text const &)" (__imp_??4Text@Unicode@sf@@QAEAAV012@ABV012@@Z) already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-graphics-d.lib
Warning 6 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-graphics-d.lib
Warning 7 warning LNK4006: "public: class sf::Clock & __thiscall sf::Clock::operator=(class sf::Clock const &)" (??4Clock@sf@@QAEAAV01@ABV01@@Z) already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-graphics-d.lib
Warning 8 warning LNK4006: "__declspec(dllimport) public: class sf::Clock & __thiscall sf::Clock::operator=(class sf::Clock const &)" (__imp_??4Clock@sf@@QAEAAV01@ABV01@@Z) already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-graphics-d.lib
Warning 9 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-graphics-d.lib
Warning 10 warning LNK4006: "public: __thiscall sf::Unicode::Text::~Text(void)" (??1Text@Unicode@sf@@QAE@XZ) already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-graphics-d.lib
Warning 11 warning LNK4006: "__declspec(dllimport) public: __thiscall sf::Unicode::Text::~Text(void)" (__imp_??1Text@Unicode@sf@@QAE@XZ) already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-graphics-d.lib
Warning 12 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-graphics-d.lib
Warning 13 warning LNK4006: "public: __thiscall sf::Unicode::Text::Text(class sf::Unicode::Text const &)" (??0Text@Unicode@sf@@QAE@ABV012@@Z) already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-graphics-d.lib
Warning 14 warning LNK4006: "__declspec(dllimport) public: __thiscall sf::Unicode::Text::Text(class sf::Unicode::Text const &)" (__imp_??0Text@Unicode@sf@@QAE@ABV012@@Z) already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-graphics-d.lib
Warning 15 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-graphics-d.lib
Warning 16 warning LNK4006: "protected: __thiscall sf::NonCopyable::NonCopyable(void)" (??0NonCopyable@sf@@IAE@XZ) already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-graphics-d.lib
Warning 17 warning LNK4006: "__declspec(dllimport) protected: __thiscall sf::NonCopyable::NonCopyable(void)" (__imp_??0NonCopyable@sf@@IAE@XZ) already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-graphics-d.lib
Warning 18 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-graphics-d.lib
Warning 19 warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-graphics-d.lib
Warning 20 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-graphics-d.lib
Warning 21 warning LNK4006: "__declspec(dllimport) const sf::WindowListener::`vftable'" (__imp_??_7WindowListener@sf@@6B@) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored sfml-window-d.lib
Warning 22 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-d.lib
Warning 23 warning LNK4006: "public: class sf::WindowListener & __thiscall sf::WindowListener::operator=(class sf::WindowListener const &)" (??4WindowListener@sf@@QAEAAV01@ABV01@@Z) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored sfml-window-d.lib
Warning 24 warning LNK4006: "__declspec(dllimport) public: class sf::WindowListener & __thiscall sf::WindowListener::operator=(class sf::WindowListener const &)" (__imp_??4WindowListener@sf@@QAEAAV01@ABV01@@Z) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored sfml-window-d.lib
Warning 25 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-d.lib
Warning 26 warning LNK4006: "public: class sf::VideoMode & __thiscall sf::VideoMode::operator=(class sf::VideoMode const &)" (??4VideoMode@sf@@QAEAAV01@ABV01@@Z) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored sfml-window-d.lib
Warning 27 warning LNK4006: "__declspec(dllimport) public: class sf::VideoMode & __thiscall sf::VideoMode::operator=(class sf::VideoMode const &)" (__imp_??4VideoMode@sf@@QAEAAV01@ABV01@@Z) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored sfml-window-d.lib
Warning 28 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-d.lib
Warning 29 warning LNK4006: "public: class sf::Clock & __thiscall sf::Clock::operator=(class sf::Clock const &)" (??4Clock@sf@@QAEAAV01@ABV01@@Z) already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-window-d.lib
Warning 30 warning LNK4006: "__declspec(dllimport) public: class sf::Clock & __thiscall sf::Clock::operator=(class sf::Clock const &)" (__imp_??4Clock@sf@@QAEAAV01@ABV01@@Z) already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-window-d.lib
Warning 31 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-d.lib
Warning 32 warning LNK4006: "protected: virtual __thiscall sf::WindowListener::~WindowListener(void)" (??1WindowListener@sf@@MAE@XZ) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored sfml-window-d.lib
Warning 33 warning LNK4006: "__declspec(dllimport) protected: virtual __thiscall sf::WindowListener::~WindowListener(void)" (__imp_??1WindowListener@sf@@MAE@XZ) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored sfml-window-d.lib
Warning 34 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-d.lib
Warning 35 warning LNK4006: "public: virtual __thiscall sf::Input::~Input(void)" (??1Input@sf@@UAE@XZ) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored sfml-window-d.lib
Warning 36 warning LNK4006: "__declspec(dllimport) public: virtual __thiscall sf::Input::~Input(void)" (__imp_??1Input@sf@@UAE@XZ) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored sfml-window-d.lib
Warning 37 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-d.lib
Warning 38 warning LNK4006: "public: __thiscall sf::WindowListener::WindowListener(void)" (??0WindowListener@sf@@QAE@XZ) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored sfml-window-d.lib
Warning 39 warning LNK4006: "__declspec(dllimport) public: __thiscall sf::WindowListener::WindowListener(void)" (__imp_??0WindowListener@sf@@QAE@XZ) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored sfml-window-d.lib
Warning 40 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-d.lib
Warning 41 warning LNK4006: "public: __thiscall sf::WindowListener::WindowListener(class sf::WindowListener const &)" (??0WindowListener@sf@@QAE@ABV01@@Z) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored sfml-window-d.lib
Warning 42 warning LNK4006: "__declspec(dllimport) public: __thiscall sf::WindowListener::WindowListener(class sf::WindowListener const &)" (__imp_??0WindowListener@sf@@QAE@ABV01@@Z) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored sfml-window-d.lib
Warning 43 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-d.lib
Warning 44 warning LNK4006: "protected: __thiscall sf::NonCopyable::NonCopyable(void)" (??0NonCopyable@sf@@IAE@XZ) already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-window-d.lib
Warning 45 warning LNK4006: "__declspec(dllimport) protected: __thiscall sf::NonCopyable::NonCopyable(void)" (__imp_??0NonCopyable@sf@@IAE@XZ) already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-window-d.lib
Warning 46 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-d.lib
Warning 47 warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in sfml-system-d.lib(sfml-system-d.dll); second definition ignored sfml-window-d.lib
Warning 48 warning LNK4221: no public symbols found; archive member will be inaccessible sfml-window-d.lib
Warning 49 warning LNK4006: "public: virtual __thiscall sf::Sprite::~Sprite(void)" (??1Sprite@sf@@UAE@XZ) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored Tile.obj
Warning 50 warning LNK4006: "public: class sf::Sprite & __thiscall sf::Sprite::operator=(class sf::Sprite const &)" (??4Sprite@sf@@QAEAAV01@ABV01@@Z) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored Tile.obj
Warning 51 warning LNK4006: "public: class sf::Drawable & __thiscall sf::Drawable::operator=(class sf::Drawable const &)" (??4Drawable@sf@@QAEAAV01@ABV01@@Z) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored Tile.obj
Warning 52 warning LNK4006: "private: void __thiscall sf::Resource<class sf::Image>::Connect(class sf::ResourcePtr<class sf::Image> &)const " (?Connect@?$Resource@VImage@sf@@@sf@@ABEXAAV?$ResourcePtr@VImage@sf@@@2@@Z) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored Tile.obj
Warning 53 warning LNK4006: "private: void __thiscall sf::Resource<class sf::Image>::Disconnect(class sf::ResourcePtr<class sf::Image> &)const " (?Disconnect@?$Resource@VImage@sf@@@sf@@ABEXAAV?$ResourcePtr@VImage@sf@@@2@@Z) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll); second definition ignored Tile.obj
Warning 54 warning LNK4221: no public symbols found; archive member will be inaccessible SFML_Tools.obj
Warning 55 warning LNK4221: no public symbols found; archive member will be inaccessible Geometry.obj

mitchgc

  • Newbie
  • *
  • Posts: 27
    • View Profile
Hundreds of linker warnings
« Reply #2 on: December 29, 2009, 09:02:19 am »
Anyone?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Hundreds of linker warnings
« Reply #3 on: December 29, 2009, 10:13:16 am »
Can you show a minimal piece of code that reproduces these errors?
Laurent Gomila - SFML developer

mitchgc

  • Newbie
  • *
  • Posts: 27
    • View Profile
Hundreds of linker warnings
« Reply #4 on: December 30, 2009, 05:01:19 am »
I've created and attached a project with a test.h and test.cpp files (and stdafx.h, stdafx.cpp) and the bare minimum of include/linker settings that demonstrates the problem. It's a lot easier than trying to explain all my settings on here.  :wink:

http://www.mediafire.com/?nmqjzhgmnmm

If for some reason that link doesn't work, let me know and I'll email it to you.

mitchgc

  • Newbie
  • *
  • Posts: 27
    • View Profile
Hundreds of linker warnings
« Reply #5 on: January 03, 2010, 09:06:30 am »
Bump. Anyone want to compile this and see what it gives them?

mitchgc

  • Newbie
  • *
  • Posts: 27
    • View Profile
Hundreds of linker warnings
« Reply #6 on: July 20, 2010, 11:32:26 am »
Still have this problem.

mitchgc

  • Newbie
  • *
  • Posts: 27
    • View Profile
Hundreds of linker warnings
« Reply #7 on: July 26, 2010, 12:19:45 am »
Occurs for SFML 2, also.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Hundreds of linker warnings
« Reply #8 on: July 26, 2010, 09:37:47 am »
Ok, I've figured out what happens. I'll fix it soon.

Thanks for the feedback :)
Laurent Gomila - SFML developer

r0d

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Hundreds of linker warnings
« Reply #9 on: December 07, 2010, 10:28:19 am »
hi,

I got the same problem with the SFML 2.
But i do something weird: i compiled the smfl2 as a dynamic library (well i guess i did it because the smfl-xxx.dll are much more bigger than the smfl-xxx.lib, and because my program that use the smfl lib need the dlls to run). But my program that use the smfl lib is compiled without the precompiler declaration SFML_DYNAMIC.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Hundreds of linker warnings
« Reply #10 on: December 07, 2010, 10:36:49 am »
Quote
But my program that use the smfl lib is compiled without the precompiler declaration SFML_DYNAMIC.

There's no more SFML_DYNAMIC, now it's SFML_STATIC (for static libs).

Quote
smfl

SFML :evil:
Laurent Gomila - SFML developer

r0d

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Hundreds of linker warnings
« Reply #11 on: December 07, 2010, 12:33:35 pm »
Quote from: "Laurent"
There's no more SFML_DYNAMIC, now it's SFML_STATIC (for static libs).

Ok, thank you.

Quote
SFML :evil:
Ooops sorry :oops:

 

anything