lvqcl
2013-Sep-29 09:14 UTC
[flac-dev] MSVS: debug flac.exe uses release libogg_static.lib
With current settings, MSVS links debug version of flac.exe (and other .exe and .dll files) with the release version of libogg_static.lib. MSVS issues a "warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library" What's the reason in this setting? What is better: * to change the settings so that MSVS will link debug .exe files with the debug version of libogg_static.lib, or * to add libcmt.lib into "IgnoreDefaultLibraryNames" option in the same way as it was done for libFLAC_dynamic.vcproj (see http://git.xiph.org/?p=flac.git;a=commit;h=c152d1adf910409bff06b9651247584d9e606c95 )?
Ralph Giles
2013-Sep-29 17:10 UTC
[flac-dev] MSVS: debug flac.exe uses release libogg_static.lib
On 2013-09-29 2:14 AM, lvqcl wrote:> With current settings, MSVS links debug version of flac.exe (and other .exe and .dll files) with the release version of libogg_static.lib. MSVS issues a "warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library" > > What's the reason in this setting?Sounds like a bug. Debug targets should link to debug builds of their dependencies to simplify debugging. -r
lvqcl
2013-Sep-29 18:46 UTC
[flac-dev] MSVS: debug flac.exe uses release libogg_static.lib
Ralph Giles wrote:>> With current settings, MSVS links debug version of flac.exe (and other >> .exe and .dll files) with the release version of libogg_static.lib. >> MSVS issues a "warning LNK4098: defaultlib 'libcmt.lib' conflicts with use >> of other libs; use /NODEFAULTLIB:library" > > Sounds like a bug. Debug targets should link to debug builds of their > dependencies to simplify debugging.I agree, but according to README (section "Building with MSVC"): user builds libogg_static.lib separately, and then copies the file to flac\objs\release\lib directory. It seems that libogg debugging is not possible with such build method anyway. (I know that such thing is very dangerous for C++ program that uses STL/Boost/etc. But libogg is a pure C library, so it seems to be safe. A bit ugly though.)