我正在尝试将静态库从 VC++2008 转换为 VC++2010,并且收到有关 TargetPath 和 TargetName 的警告。我查看了我的配置,但不知道如何让这些消失。对于我通常构建一次并且很少重建的静态库,它是严重的还是真的只是一个可忽略的警告。
我认为这与项目名为itk32的事实有关,但是库的调试版本名为itk32d.lib,并且在Visual C++ 6.0时代的旧配置方式导致了某种怪异设置保留在 vc2010 项目中,该项目前段时间从 VC6 转换为 2008,我现在正在转换为 2010:
1>------ Build started: Project: Itk32, Configuration: Debug Win32 ------
1>...\Microsoft.CppBuild.targets(1151,5): warning MSB8012: TargetPath(C:\...\Libraries\Itk\.\Debug\Itk32d.lib.lib) does not match the Library's OutputFile property value (C:\...\Libraries\Itk\Debug\Itk32d.lib). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
1>...\Microsoft.CppBuild.targets(1153,5): warning MSB8012: TargetName(Itk32d.lib) does not match the Library's OutputFile property value (Itk32d). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========