-
-
Notifications
You must be signed in to change notification settings - Fork 745
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
add_packages 静态库时由于库重名导致符号丢失 #4964
Labels
Comments
Title: add_packages When using a static library, symbols are lost due to duplicate library names. |
试下这个。#5066 (comment) |
Try this. #5066 (comment) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Xmake 版本
xmake v2.8.5
操作系统版本和架构
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
描述问题
假设系统库中存在 k 库,而 add_packages("foo") 中 foo 也提供了 libk.a,当前 xmake 在链接 add_packages 引入的静态库时用的是 -L${target:pkgs("foo"):installdir("lib")} -lk 选项,从而导致我们在使用系统库 k 符号缺失。
期待的结果
希望可以提供一个 feature 让用户控制是使用 -l 使用 add_packages 引入的静态库,还是直接在链接时直接引用整个 libk.a 的绝对地址避免重名。
为了不影响之前的逻辑,默认使用 -l。
工程配置
附加信息和错误日志
丢失系统库 k 符号。
The text was updated successfully, but these errors were encountered: