Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我意识到这可能是由某处的 _dllexport() 引起的,而不是在我的代码中,而是在某些第三方代码中。(Qt, Boost, OpenSG, ...)
是否有一个简单的链接器选项来禁用它?我已经搜索但没有找到任何地方。
AFAIK,不,因为相关的#pragma 覆盖了链接器设置。
我建议您确保中间文件和输出文件具有不同的文件夹。
我用这种方式设置项目(项目属性/一般配置页面):
Output Directory = $(SolutionDir)\Build\$(ConfigurationName) Intermediate Directory = $(SolutionDir)\Build\$(ConfigurationName)\$(ProjectName)