summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorruki <[email protected]>2016-09-18 14:07:14 +0800
committerruki <[email protected]>2016-09-18 14:07:14 +0800
commita542f78da612c7802bce751aec1ae7c7c06d745d (patch)
tree3f9120c728bfcb164f7422dec461be1454b68323 /core/src
parentd09980927326e1cbb534b8d557435cd780e7d0ef (diff)
patch __iob_func for vs2015
Diffstat (limited to 'core/src')
-rwxr-xr-xcore/src/xmake/machine.c8
1 files changed, 8 insertions, 0 deletions
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
*/