From b8775872fc672dc73c66cb73a5ebc658f5243e25 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 7 Feb 2025 00:52:33 +0800 Subject: update template --- xmake/templates/c++/xmake.cli/project/src/lni/main.cpp | 2 ++ xmake/templates/c++/xmake.cli/template.lua | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xmake/templates/c++/xmake.cli/project/src/lni/main.cpp b/xmake/templates/c++/xmake.cli/project/src/lni/main.cpp index 8b9bc4524..80237da16 100644 --- a/xmake/templates/c++/xmake.cli/project/src/lni/main.cpp +++ b/xmake/templates/c++/xmake.cli/project/src/lni/main.cpp @@ -1,4 +1,6 @@ +extern "C" { #include +} static tb_byte_t const g_luafiles_data[] = { #include "luafiles.xmz.h" diff --git a/xmake/templates/c++/xmake.cli/template.lua b/xmake/templates/c++/xmake.cli/template.lua index 45f1135c6..431e0af1f 100644 --- a/xmake/templates/c++/xmake.cli/template.lua +++ b/xmake/templates/c++/xmake.cli/template.lua @@ -1,3 +1,3 @@ template("xmake.cli") - add_configfiles("src/lni/main.c") + add_configfiles("src/lni/main.cpp") add_configfiles("xmake.lua") -- cgit v1.3.1