How do I fix warning MSB8012 in a static library project in Visual C++ 2010?

浪子不回头ぞ 提交于 2019-11-27 14:04:58

The build system was dramatically overhauled in VS2010, it now uses MSBuild instead of the custom VCBuild system. The same build system used by other languages supported by VS. They did a pretty good job of making that invisible, old projects normally build just fine. But there are a few places where you can get in trouble when you import old projects. Which is what this warning is saying.

Using the linker's General + Output File setting to name the output file is one such troublespot. Not actually that sure what can go wrong, it probably has something to do with dependency checking. The default setting for it is $(OutDir)$(TargetName)$(TargetExt). The best way to rename the output file is therefore to change the $(TargetName) macro value.

Which is available on the main General page as the "Target Name" setting. It didn't exist in earlier VS versions. So change that one to "itk32d". Or better, $(ProjectName)d. And reset the linker setting.

I had this problem but could not find a valid answer here in SO, eventually I found out that it was solved by fixing the Intermediate Directory from ".\Debug" to "..\Debug", and ".\Release" to "..\Release" in each build configuration.

I'm sorry this is only worth for a comment but I don't have enough points to add comments to other people's posts.

have experienced similar looking problem but i was able to resolve changing $(ConfigurationName) of parameter using previous version's convention to $(Configuration).. I would not imagine such a thing but when I checked that was the case, naming convention is changed and re-intrepretation is mostly works and there but for few things it is not fully interpreted and that was the cause..

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!