admin管理员组文章数量:1397134
I'm trying to build a solution from a mono-repo (I don't believe the mono-repo structure should matter).
One of the projects produces errors due to mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '1' in Error.obj
Every project, including the libraries, uses the same build task in MSVC Debug.
The projects' VS configurations are being generated by cli tools.
Output
163>leveldb.lib(repair.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '1' in Error.obj
163>leveldb.lib(table_builder.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '1' in Error.obj
....
163>..\..\bin\five\debug\citizen-resources-client.dll : fatal error LNK1319: 34 mismatches detected
This doesn't happen for anyone else using the repo. The solution successfully builds with a fresh VM. The solution successfully builds with a fresh User. I re-installed MS VS and the required build tools. I checked all 192 projects in the solution for the definitions, and they use the same debug definition.
I'm trying to build a solution from a mono-repo (I don't believe the mono-repo structure should matter).
One of the projects produces errors due to mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '1' in Error.obj
Every project, including the libraries, uses the same build task in MSVC Debug.
The projects' VS configurations are being generated by cli tools.
Output
163>leveldb.lib(repair.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '1' in Error.obj
163>leveldb.lib(table_builder.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '1' in Error.obj
....
163>..\..\bin\five\debug\citizen-resources-client.dll : fatal error LNK1319: 34 mismatches detected
This doesn't happen for anyone else using the repo. The solution successfully builds with a fresh VM. The solution successfully builds with a fresh User. I re-installed MS VS and the required build tools. I checked all 192 projects in the solution for the definitions, and they use the same debug definition.
Share Improve this question edited Apr 3 at 18:42 The Gamerzs asked Mar 26 at 13:26 The GamerzsThe Gamerzs 235 bronze badges 01 Answer
Reset to default 0I managed to fix the errors by deleting the following files in %localappdata%\vcpkg
:
vcpkg.user.props
vcpkg.user.targets
It seems MSVS was allowing vcpkg to import custom properties with the following
<Import Condition="Exists('C:\Scripts\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets') and '$(VCPkgLocalAppDataDisabled)' == ''" Project="C:\Scripts\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets" />
本文标签: visual cWhy does MSVC build with different definitions in the same build taskStack Overflow
版权声明:本文标题:visual c++ - Why does MSVC build with different definitions in the same build task? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744141155a2592628.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论