From a542f78da612c7802bce751aec1ae7c7c06d745d Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 18 Sep 2016 14:07:14 +0800 Subject: patch __iob_func for vs2015 --- core/src/xmake/machine.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/src/xmake/machine.c b/core/src/xmake/machine.c index 3f33f58ef..edea11a56 100755 --- a/core/src/xmake/machine.c +++ b/core/src/xmake/machine.c @@ -152,6 +152,14 @@ static luaL_Reg const g_process_functions[] = , { tb_null, tb_null } }; +// patch for linking error on vs2015: unresolved external symbol ___iob_func +#if defined(TB_COMPILER_IS_MSVC) && _MSC_VER >= 1900 +extern "C" +{ + FILE __iob_func[3] = { *stdin, *stdout, *stderr }; +} +#endif + /* ////////////////////////////////////////////////////////////////////////////////////// * private implementation */ -- cgit v1.3.1