如何将xmake作为一个动态库生成工具 #7110
如何将xmake作为一个动态库生成工具
#7110
-
|
场景是这样的: add_requires("raylib")
add_requires("SDL3")然后我执行类似于 xmake install -o path/to/install 就会安装动态库到指定的目录. 这样的流程应该怎么做呢 |
Beta Was this translation helpful? Give feedback.
Answered by
waruqi
Dec 9, 2025
Replies: 3 comments 6 replies
-
|
xrepo 命令不是能直接导出么,如果是当成项目写,你得生成依赖这些 packages 的 target 才行,比较麻烦。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
有些是依赖 vcpkg 的, 我让 xmake 来导入. 比如 mujoco add_requires("vcpkg::mujoco", {configs = {shared = true}})我能不能写一个 dummy int main() { return 0; }然后 add_rules("mode.debug", "mode.release")
add_requires("vcpkg::mujoco", {configs = {shared = true}})
target("dll")
set_kind("binary")
add_files("main.cpp")
add_packages("vcpkg::mujoco")不过这样做, 并没有 mujoco 的动态库, 只有一个 bin 文件. 似乎这是静态链接的 |
Beta Was this translation helpful? Give feedback.
5 replies
-
|
mujoco 包可以等 xmake-io/xmake-repo#8810 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
直接用 xrepo install 不就好了