warning MSB8012 : make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile)

后端 未结 8 1833
忘掉有多难
忘掉有多难 2020-12-02 14:25

I am getting the following error when building my code.

C:\\Program Files (x86)\\MSBuild\\Microsoft.Cpp\\v4.0\\Microsoft.CppBuild.targets(990,5):

8条回答
  •  伪装坚强ぢ
    2020-12-02 15:18

    I had the scenario where my executable name was different than the project name AND I wanted it to build the executable/dll to a different location than where the project was located.

    1)Change the default project name to be different. General->TargetName
    < my executable name>

    2) Output to a different location where I want the executable to build. General->OutputDirectory < my new location goes here >

    3) Update the Linker settings. Linker->General new value: $(OutDir)$(TargetName)$(TargetExt)
    This takes on the new settings from 1 and 2.

提交回复
热议问题