summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-02-07 00:52:33 +0800
committerruki <[email protected]>2025-02-07 00:52:33 +0800
commitb8775872fc672dc73c66cb73a5ebc658f5243e25 (patch)
tree3d9e7c5c7f935b8e523d740f8bffce999ffb155f
parent10fa86560ba4fb831d7aadf20ef9dd170c815b61 (diff)
update template
-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")