xmake-io / xmake

🔥 A cross-platform build utility based on Lua
https://xmake.io
Apache License 2.0
9.87k stars 776 forks source link

Windows下shared目标缺少定义_WINDLL宏 #5333

Closed Elite-stay closed 2 months ago

Elite-stay commented 2 months ago

Xmake 版本

2.9.3

操作系统版本和架构

Windows

描述问题

通过vs新建的动态库工程会自动包含名为Windows Dynamic Link Library,实则为Microsoft.Cpp.WinDLL.props的属性表,这个属性表会增加定义_WINDLL宏,但目前set_kind(“shared")中并没有

期待的结果

设置set_kind(“shared")后,如果是使用vs进行编译,则增加_WINDLL宏

工程配置

.

附加信息和错误日志

.

waruqi commented 2 months ago

xmake 默认不会加任何内置定义的, 也不会保证必须跟 vs 的配置保持同步,你可以自己配置上。

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.


xmake does not add any built-in definitions by default, nor does it guarantee that it must be synchronized with the vs configuration. You can configure it yourself.