问题描述
我使用的是使用2015工具集构建的静态库,使用2017构建我的DLL。在该配置中 - 并希望支持 - 我收到链接器错误,指出它无法找到从静态lib导出的符号,我正在联系。当我使用2015工具集切换到
构建我的DLL时,这对我来说似乎是明显的补救措施,我从链接器中得到以下错误:
LINK:致命错误C1007 :'p2'中无法识别的标志'-Ot'
当我在VS中查看项目属性页中的命令行时,我找不到任何我传入的内容。 / p>
在线阅读文档,似乎我应该能够将2017工具集与使用2015工具集创建的静态库链接。那是对的吗?如果没有,我如何摆脱无法识别的标志错误?
谢谢,
I am using a static lib built with the 2015 toolset, building my DLL using 2017. In that configuration - and hoping that is supported - I get linker errors stating it can't find symbols exported from the static lib, I am linking against. When I switch to building my DLL using the 2015 toolset, which seemed like the obvious remedy to me, I get the following error from the linker:
LINK: fatal error C1007: unrecognized flag '-Ot' in 'p2'
I don't find anywhere I pass in -Ot when I look at the commandline in the property pages of the project in VS.
Reading the docs online, it seems that I should be able to link with the 2017 toolset against a static lib created with the 2015 toolset. Is that correct? If not, how do I get rid of that unrecognized flag error?
Thanks,
这篇关于使用VS2015链接静态库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!