Skip to content

Commit a6f3e22

Browse files
committed
build: attempt to fix but still failed to link
1 parent ef7ec9a commit a6f3e22

File tree

2 files changed

+30
-39
lines changed

2 files changed

+30
-39
lines changed

.clangd

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
Diagnostics:
2-
Suppress:
2+
Suppress:
33
- "-Wmicrosoft-enum-forward-reference"
44
- "-Wc++11-narrowing"
55
- "-Wc++2b-extensions"
66
- "-Wmicrosoft-cast"
77
CompileFlags:
8-
Add:
8+
Add:
99
- "-ferror-limit=0"
10-
- "-D__FUNCTION__=\"dummy\""
11-
- "-Yumc/_HeaderOutputPredefine.h"
12-
- "-FImc/_HeaderOutputPredefine.h" # clangd bug can't find pch file
13-
Remove:
14-
- "/Yu_HeaderOutputPredefine.h"
15-
- "/FI_HeaderOutputPredefine.h"
10+
- '-D__FUNCTION__="dummy"'
11+
- "-Yusrc/ll/api/Global.h"
12+
- "-FIsrc/ll/api/Global.h" # clangd bug can't find pch file
13+
Remove:
14+
- "/YuGlobal.h"
15+
- "/FIGlobal.h"

xmake.lua

+22-31
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,21 @@ add_rules("mode.debug", "mode.release", "mode.releasedbg")
22

33
add_repositories("liteldev-repo https://github.com/LiteLDev/xmake-repo.git")
44
add_requires(
5-
"simpleini v4.19",
6-
"toml++ 3.4.0",
7-
"sqlite3 3.43.0+200",
8-
"mariadb-connector-c 3.3.4",
5+
"demangler v2.0.0",
96
"dyncall 1.4",
10-
"lightwebsocketclient 1.0.0",
11-
"demangler 2.0.0",
7+
"legacymoney 0.1.5",
8+
"legacyparticleapi 0.1.1",
129
"levilamina 0.5.1",
13-
"legacymoney",
14-
"legacyparticleapi"
10+
"lightwebsocketclient 1.0.0",
11+
"mariadb-connector-c 3.3.4",
12+
"simpleini v4.19",
13+
"sqlite3 3.43.0+200",
14+
"toml++ v3.4.0"
1515
)
1616
add_requires("cpp-httplib v0.14.0", {configs = {ssl=true, zlib=true}})
17-
add_requires("scriptx", {configs={backend=get_config("backend")}})
18-
19-
if not has_config("vs_runtime") then
20-
set_runtimes("MD")
21-
end
17+
add_requires("scriptx 0.1.0", {configs={backend=get_config("backend")}})
2218

23-
local LLSE_BACKEND = "LUA"
19+
set_runtimes("MD") -- For compatibility with the /MT build configuration of ScriptX.
2420

2521
option("backend")
2622
set_default("lua")
@@ -63,7 +59,7 @@ target("legacy-script-engine")
6359
"/utf-8"
6460
)
6561
add_defines(
66-
"_HAS_CXX23=1", -- To enable C++23 features
62+
"_HAS_CXX23=1", -- To enable C++23 features.
6763
"_WIN32_WINNT=0x0601",
6864
"_AMD64_",
6965
"_CONSOLE",
@@ -73,7 +69,7 @@ target("legacy-script-engine")
7369
"NDEBUG",
7470
"NOMINMAX",
7571
"UNICODE",
76-
"LLSE_BACKEND_" .. LLSE_BACKEND,
72+
"LLSE_BACKEND_LUA",
7773
"ENTT_PACKED_PAGE=128"
7874
)
7975
add_files(
@@ -83,28 +79,23 @@ target("legacy-script-engine")
8379
"src"
8480
)
8581
add_packages(
82+
"cpp-httplib",
83+
"demangler",
84+
"dyncall",
85+
"legacymoney",
86+
"legacyparticleapi",
8687
"levilamina",
88+
"lightwebsocketclient",
89+
"mariadb-connector-c",
8790
"scriptx",
88-
"nlohmann_json",
8991
"simpleini",
90-
"toml++",
91-
"magic_enum",
92-
"leveldb",
93-
"rapidjson",
94-
"cpp-httplib",
9592
"sqlite3",
96-
"mariadb-connector-c",
97-
98-
"dyncall",
99-
"lightwebsocketclient",
100-
"demangler",
101-
"legacymoney",
102-
"legacyparticleapi"
93+
"toml++"
10394
)
10495
add_shflags(
105-
"/DELAYLOAD:bedrock_server.dll"
96+
"/DELAYLOAD:bedrock_server.dll" -- To allow including Minecraft headers without linking.
10697
)
10798
set_basename("legacy-script-engine-$(backend)")
108-
set_exceptions("none") -- To avoid conflicts with /EHa
99+
set_exceptions("none") -- To avoid conflicts with /EHa.
109100
set_kind("shared")
110101
set_languages("cxx20")

0 commit comments

Comments
 (0)