[Gtkradiant] defaultlib 'LIBCMTD' conflicts with use of other libs

Nerius Landys nlandys at gmail.com
Mon Jan 31 01:11:15 CST 2011


OK good news.  I have sorted out the libjpeg issues.
Learning how to maneuver around the creations of Bill Gates and his n00bsy
minions is a black art.
So what I've done is I've created a Visual C++ 2008 project file for
jpeg-8c.  (svn://porky.nerius.com/repos/jpeg-8c-win32 , in particular read
README-FIRST)
When I compile libjpeg.lib from VC++2008 in this manner, I get the following
results:

=============================================
C:\MinGW\msys\1.0\home\nlandys>dumpbin /directives libjpeg.lib

Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file libjpeg.lib

File Type: LIBRARY

   Linker Directives
   -----------------
   /manifestdependency:"type='win32'
   name='Microsoft.VC90.CRT'
   version='9.0.21022.8'
   processorArchitecture='x86'
   publicKeyToken='1fc8b3b9a1e18e3b'"
   /DEFAULTLIB:"MSVCRT"
   /DEFAULTLIB:"OLDNAMES"
=============================================

compare that with the previous results.  I'm just beginning to understand
what all this stuff means.  I think we'll be building all of Radiant + tools
against MSVCRT in the future, but if that's not the case, we can create a
special version of libs such as libjpeg that use other C libraries (since I
know how to do that now).

Anyhow, the project svn://porky.nerius.com/repos/gtk-test-proj , which
contains sample code using Gtk+, GtkGlExt, libxml2, and libjpeg (libjpeg =
static lib), compiles with a few expected warnings, and no linker warnings
or errors.

The last part of assembling the new external libs is the STLport stuff, not
yet sure what this is but will figure it out soon.

The step after that will be to redo the .vcproj files in Radiant.  And fix
any code to get things to compile and work against the new libs.

- Rambetter


On Fri, Jan 28, 2011 at 11:53 PM, Nerius Landys <nlandys at gmail.com> wrote:

> I compiled libjpeg (jpeg-8c) for Windows, thereby generating a libjpeg.lib
> file, which is a statically linked library.
>
> I updated my test project (svn://porky.nerius.com/repos/gtk-test-proj) to
> now use bits of code from Gtk+, GtkGlExt, libxml2, and libjpeg.  (If you
> want to compile the project in Visual Studio 2008 make sure to first run
> gtk-test-proj/setup.sh from MSYS terminal emulator, which will download the
> newly compiled external libs Gtk+, GtkGlExt, libxml2, and libjpeg).
>
> When compiling my test project in VS2008, I get a warning, but it still
> works OK:
>
> LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other
> libs; use /NODEFAULTLIB:library
>
> I've been doing research on how to cleanly resolve this situation and I'm
> running a little thin on leads.  I did do this:
>
> ========================================================
> c:\MinGW\msys\1.0\home\nlandys\jpeg-8c>dumpbin /directives libjpeg.lib
> Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
>
> Dump of file libjpeg.lib
>
> File Type: LIBRARY
>
>    Linker Directives
>    -----------------
>    /DEFAULTLIB:"LIBCMTD"
>    /DEFAULTLIB:"OLDNAMES"
>
>    Linker Directives
>    -----------------
>    /DEFAULTLIB:"LIBCMTD"
>    /DEFAULTLIB:"OLDNAMES"
>
>    Linker Directives
>    -----------------
>    /DEFAULTLIB:"LIBCMTD"
>    /DEFAULTLIB:"OLDNAMES"
>
> ...
> ===================================================
>
> Now libjpeg is the only statically linked library so far in my new
> collection of libraries, and it is causing the compiler warning above.  The
> other libraries, Gtk+ and friends, GtkGlExt, and libxml2, are dynamically
> loaded DLLs, and if my project removes libjpeg I no longer get the compiler
> warning.
>
> Can someone give me some advice on how to get rid of the Visual Studio 2008
> compiler warning?
>
> The further I dive into this Microsoft thingy, the more I hate Microsoft,
> actually.  I really see some really weak spots in Microsoft software when
> you try to do really nifty things that are otherwise very simple with UNIX.
>
> - Rambetter
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://zerowing.idsoftware.com/pipermail/gtkradiant/attachments/20110130/e06a37d8/attachment.htm 


More information about the Gtkradiant mailing list