同时生成静态库和动态库
#3749
Replies: 1 comment 1 reply
-
生成 A.dll ,只要你导出了符号。。编译器会自动在对应 dll 目录下生成一个 A.lib 导入库,用于 link A.dll 的。。你无法在当前目录,再去生成一个静态库 A.lib 。。当然会冲突。。
定义两个 target, 一个 static 一个 shared |
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
Uh oh!
There was an error while loading. Please reload this page.
-
target:set_kind一次只能生成静态库或者动态库
我在使用MSVC时,遇到了一些问题(我不确定是不是MSVC问题),例如我有A.dll动态库,编译B.dll时希望依赖A.dll,但xmake命令行尝试使用了A.lib,但我没有办法同时生成同名的静态库
我做的修补是设定不同的target以便同时生成,但这会导致库名字不一致(通过魔改可以解决一部分问题)
所以最终有两个问题:
set_kind("library")
Beta Was this translation helpful? Give feedback.
All reactions