From 66ec236100d9972c1ce3dff8f36b43b20757255d Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 18 Sep 2016 14:30:27 +0800 Subject: fix ___iob_func for vs2015 --- core/src/xmake/machine.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/xmake/machine.c b/core/src/xmake/machine.c index 2f0791834..ebb360629 100755 --- a/core/src/xmake/machine.c +++ b/core/src/xmake/machine.c @@ -155,10 +155,8 @@ static luaL_Reg const g_process_functions[] = // patch for linking error on vs2015: unresolved external symbol ___iob_func, fprintf, fscanf #if defined(TB_COMPILER_IS_MSVC) && _MSC_VER >= 1900 # pragma comment(lib, "legacy_stdio_definitions.lib") -extern "C" -{ - FILE __iob_func[3] = { *stdin, *stdout, *stderr }; -} +FILE _iob[] = { *stdin, *stdout, *stderr }; +extern "C" FILE* __cdecl __iob_func(tb_void_t) { return _iob; } #endif /* ////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.3.1