xmake怎么静态编译? #2489
Unanswered
ZhangXiChang
asked this question in
Q&A
xmake怎么静态编译?
#2489
Replies: 1 comment 3 replies
-
不懂啥叫静态编译,只有静态链接,从没听说过,编译还能静态
-static 是 linker flags,设置到编译 flags 当然不会生效,用 add_ldflags |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
同一个项目代码和库,我用cmake可以静态编译。但是用xmake静态编译虽然没有报错。但是二进制文件实际上没有静态编译。
这是我xmake的lua
{
set_project("GameEngine")
set_version("0.1.0")
--Vulkan
add_includedirs("./SDK/Vulkan/Include")
add_linkdirs("./SDK/Vulkan/Lib")
--GLFW
add_includedirs("./SDK/GLFW/include")
add_linkdirs("./SDK/GLFW/lib-mingw-w64")
--GLM
add_includedirs("./SDK/GLM/include")
--STB
add_includedirs("./SDK/STB/include")
--Assimp
add_includedirs("./SDK/Assimp/include")
add_linkdirs("./SDK/Assimp/lib")
target("Demo_WinDBG")
--平台架构
set_toolchains("mingw")
set_plat("windows")
set_arch("x64")
target_end()
}
Beta Was this translation helpful? Give feedback.
All reactions