summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/templates/c++/xmake.cli/project/src/lni/main.cpp2
-rw-r--r--xmake/templates/c++/xmake.cli/template.lua2
2 files changed, 3 insertions, 1 deletions
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 <xmake/xmake.h>
+}
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")