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

Author Topic: Linker warning (SFML-2.0)  (Read 5832 times)

0 Members and 1 Guest are viewing this topic.

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Linker warning (SFML-2.0)
« on: July 31, 2009, 05:32:52 pm »
I'm getting a LIBCMT linker warning when I use the sfml-graphics-s.lib (built from sfml-2.0 svn branch, no modifications). I get the same warning when building the samples that use the graphics lib.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Linker warning (SFML-2.0)
« Reply #1 on: July 31, 2009, 06:26:29 pm »
Which warning? With which compiler?
Laurent Gomila - SFML developer

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Linker warning (SFML-2.0)
« Reply #2 on: July 31, 2009, 09:01:30 pm »
The warning:
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library

The compiler:
Microsoft Visual C++ 2008 Professional

klusark

  • Newbie
  • *
  • Posts: 45
    • View Profile
Linker warning (SFML-2.0)
« Reply #3 on: July 31, 2009, 09:15:28 pm »
Try using /VERBOSE:LIB in the extra command line options for the linker. It should tell you a bit more about the problem.

From MSDN
Quote
The run-time libraries now contain directives to prevent mixing different types. You will receive this warning if you try to use different types or debug and non-debug versions of the run-time library in the same program. For example, if you compiled one file to use one kind of run-time library and another file to use another kind (for example, single-threaded versus multithreaded) and tried to link them, you will get this warning. You should compile all source files to use the same run-time library. See the  Use Run-Time Library (/MD, /MT, /LD) compiler options for more information.

Source

Im not sure if that quote applies because you are using sfml-graphics-s.lib and it says libcmt witch is the static version. Are you compiling them both in release or both in debug?

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Linker warning (SFML-2.0)
« Reply #4 on: July 31, 2009, 09:19:53 pm »
both the opengl sample as well as the sfml libraries are built in release mode (and with all settings as per the original vcproj)

and heres the verbose:lib output, although I don't think it's of much use...
Code: [Select]
1>Linking...
1>Searching libraries
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\opengl32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\glu32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-window-s.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-system-s.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-graphics-s.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-main.lib:
1>    Searching E:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprt.lib:
1>    Searching E:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRT.lib:
1>    Searching E:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib:
1>    Searching E:\Program Files\Microsoft Visual Studio 9.0\VC\lib\LIBCMT.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\opengl32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\glu32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-window-s.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-system-s.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-graphics-s.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-main.lib:
1>    Searching E:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprt.lib:
1>    Searching E:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRT.lib:
1>    Searching E:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib:
1>    Searching E:\Program Files\Microsoft Visual Studio 9.0\VC\lib\LIBCMT.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\opengl32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\glu32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-window-s.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-system-s.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-graphics-s.lib:
1>Finished searching libraries
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>Searching libraries
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\opengl32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\glu32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-window-s.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-system-s.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-graphics-s.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-main.lib:
1>    Searching E:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprt.lib:
1>    Searching E:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRT.lib:
1>    Searching E:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib:
1>    Searching E:\Program Files\Microsoft Visual Studio 9.0\VC\lib\LIBCMT.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\opengl32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\glu32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
1>    Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-window-s.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-system-s.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-graphics-s.lib:
1>    Searching ..\..\..\lib\vc2008\sfml-main.lib:
1>    Searching E:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprt.lib:
1>Finished searching libraries

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Linker warning (SFML-2.0)
« Reply #5 on: July 31, 2009, 09:26:45 pm »
Just a thought... with which runtime was the included freetype.lib compiled?

klusark

  • Newbie
  • *
  • Posts: 45
    • View Profile
Linker warning (SFML-2.0)
« Reply #6 on: July 31, 2009, 09:30:14 pm »
Hmm I thought verbose would provide some usefull information. Everything looks correct to me.

Hopufully someone knows how to fix this.

Edit after seeing the above post: Were there any warnings when compileing sfml? It would probably have the same warning if freetype.lib was the cause.

eleinvisible

  • Newbie
  • *
  • Posts: 47
    • View Profile
Linker warning (SFML-2.0)
« Reply #7 on: August 01, 2009, 05:15:59 am »
Just to confirm, I've been having the same warning with VC2008 Express, with both being release builds. No clue as to what is causing it though.

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Linker warning (SFML-2.0)
« Reply #8 on: August 02, 2009, 01:53:02 pm »
It's definitely freetype. Just built the freetype lib from sources, and now the warning is gone.

 

anything