检测到Visual Studio 2010不匹配_MSC_VER值不匹配

时间:2013-05-22 23:45:01

标签: c++ visual-studio-2010 visual-studio directx

尝试在Windows 7上的VS2010中设置Directx11时出现以下错误。导致此问题的原因是什么?我已经设置了所有目录和链接器文件,并且我一直遇到这个问题。

感谢。

1>------ Build started: Project: MyD3D11Project, Configuration: Debug Win32 ------
1>Build started 22-May-13 4:35:22 PM.
1>InitializeBuildStatus:
1>  Touching "Debug\MyD3D11Project.unsuccessfulbuild".
1>ClCompile:
1>  All outputs are up-to-date.
1>ManifestResourceCompile:
1>  All outputs are up-to-date.
1>Effects11d.lib(EffectAPI.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1600' in d3dApp.obj
1>Effects11d.lib(d3dxGlobal.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1600' in d3dApp.obj
1>Effects11d.lib(EffectNonRuntime.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1600' in d3dApp.obj
1>Effects11d.lib(EffectLoad.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1600' in d3dApp.obj
1>Effects11d.lib(EffectReflection.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1600' in d3dApp.obj
1>Effects11d.lib(EffectRuntime.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1600' in d3dApp.obj
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.16
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

1 个答案:

答案 0 :(得分:0)

就像Lib已经说过的名字一样,它很可能是为VS12构建的,注意库名中的“11d”(或者我错了,它代表DirectX11,我不确定,因为我从未使用过DirectX ...)。

因此尝试链接VS10版本(名称中应包含“10”而不是11)。

关于coff错误,我认为可以通过安装VS10的最新服务包来修复它。