-
-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
binary target 无法 add_deps 一个 static / shared target #4923
Comments
给 util 加上 |
Add |
嗯,没任何 cpp 文件,是无法自动识别当前 target 是 c++ 项目,也就没法走 c++ 的静态库继承逻辑,只能显式通过 |
Well, without any cpp file, it is impossible to automatically identify that the current target is a C++ project, so there is no way to use the static library inheritance logic of C++. It can only be configured explicitly through |
好的,加上后 ok 了。 |
Okay, after adding it it’s ok. |
Xmake 版本
xmake v2.8.9+dev.50dbca648
操作系统版本和架构
Linux 720ce3a659a2 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
描述问题
当我基于多个 object target 组成一个 static / shared target:
在尝试 add_deps 这个 static / shard target 时会发现不会自动 -lxxxx:
手动补上对应的链接参数可以正常编译运行:
期待的结果
我猜是因为我这个 static target 只是聚合多个 object targets,没有自己的 cc 文件触发的 bug?希望可以 add_deps 引用 static target。
工程配置
可以复现的最小 demo:
https://github.com/TOMO-CAT/xmake-template/blob/main/missed_static_deps/xmake.lua
附加信息和错误日志
The text was updated successfully, but these errors were encountered: