From 05347bc4fcd32e42c4c726064e819646bddd3f39 Mon Sep 17 00:00:00 2001 From: Dexter Date: Thu, 22 May 2014 03:11:43 +0000 Subject: [PATCH] fix a very strange luabind crash on init caused by static initialization of a std::map template dynamic initializer blowing up. can't make this stuff up! luabind.vpc and lua.vpc were missing "$BASE" macros for libs, seems to be cause (likely the iterator link error i slammed off before) also working on 2013 just to spite jon --- mp/src/thirdparty/lua/lua.vpc | 11 ++++++++--- mp/src/thirdparty/luabind/luabind.vpc | 10 ++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/mp/src/thirdparty/lua/lua.vpc b/mp/src/thirdparty/lua/lua.vpc index 30718fc9..a4cadf24 100644 --- a/mp/src/thirdparty/lua/lua.vpc +++ b/mp/src/thirdparty/lua/lua.vpc @@ -9,15 +9,20 @@ $Configuration $Compiler { $AdditionalIncludeDirectories "$BASE" - $PreprocessorDefinitions "LUA_OPNAMES" $CompileAs "Compile as C Code (/TC)" $GCC_ExtraCompilerFlags "-x c" [$LINUXALL] // force compile as C on linux, it will build with G++ by default // Dexter 20140516: valve turned on warning as errors, but lua and luabind have some crap warnings we want to ignore $TreatWarningsAsErrors "No (/WX-)" [!$ANALYZE && !$WIN64] + $PreprocessorDefinitions "$BASE;_CRT_SECURE_NO_WARNINGS;LUA_OPNAMES" + } - // additionally shut these up - $PreprocessorDefinitions "_CRT_SECURE_NO_WARNINGS" + $Librarian + { + // Suppress this warning using the undocumented /ignore linker switch + // schemalib.lib(schemaclassinfo.obj) : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library + $AdditionalOptions "$BASE /ignore:4221" + $IgnoreAllDefaultLibraries "Yes (/NODEFAULTLIB)" } } diff --git a/mp/src/thirdparty/luabind/luabind.vpc b/mp/src/thirdparty/luabind/luabind.vpc index b2a61e90..8e18f654 100644 --- a/mp/src/thirdparty/luabind/luabind.vpc +++ b/mp/src/thirdparty/luabind/luabind.vpc @@ -10,7 +10,7 @@ $Configuration { $Compiler { - $AdditionalIncludeDirectories "$BASE;$THIRDPARTYDIR;$LUADIR" + $AdditionalIncludeDirectories "$BASE;$THIRDPARTYDIR;$LUADIR" $EnableC++Exceptions "Yes (/EHsc)" //$PreprocessorDefinitions "LUABIND_CPLUSPLUS_LUA" //$CompileAs "Compile as C Code (/TC)" @@ -18,7 +18,13 @@ $Configuration $TreatWarningsAsErrors "No (/WX-)" [!$ANALYZE && !$WIN64] // additionally shut these up. _ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH is a new one, its set to 2 in luabind, and 0 elsewhere now - $PreprocessorDefinitions "_CRT_SECURE_NO_WARNINGS;_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH" + // ;_ITERATOR_DEBUG_LEVEL=0 + $PreprocessorDefinitions "$BASE;_CRT_SECURE_NO_WARNINGS" + } + + $Librarian + { + $IgnoreAllDefaultLibraries "Yes (/NODEFAULTLIB)" } }