gpt4 book ai didi

c++ - Microsoft.Cpp.Win32.Targets(62,5) : error : Required file "" is missing

转载 作者:搜寻专家 更新时间:2023-10-31 01:00:19 24 4
gpt4 key购买 nike

今天在Visual Studio 2010 Pro中新建一个C++项目,然后编译,出现如下两个错误:

1   error : Required file "" is missing.    C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets   62  6   Test

2 IntelliSense: cannot open source file "SDKDDKVer.h" c:\users\champad\documents\applications\leadinghedge-rebuild\leadinghedge\test\targetver.h 8 1 Test

第一个错误指向 Microsoft.Cpp.Win32.Targets 文件中的这个标记:

<CL Condition="'%(ClCompile.PrecompiledHeader)' == 'Create' and '%(ClCompile.ExcludedFromBuild)'!='true'"
BuildingInIDE ="$(BuildingInsideVisualStudio)"
Sources ="@(ClCompile)"

AdditionalIncludeDirectories ="%(ClCompile.AdditionalIncludeDirectories)"
AdditionalOptions ="%(ClCompile.AdditionalOptions)"
AdditionalUsingDirectories ="%(ClCompile.AdditionalUsingDirectories)"
AssemblerListingLocation ="%(ClCompile.AssemblerListingLocation)"
AssemblerOutput ="%(ClCompile.AssemblerOutput)"
BasicRuntimeChecks ="%(ClCompile.BasicRuntimeChecks)"
BrowseInformation ="%(ClCompile.BrowseInformation)"
BrowseInformationFile ="%(ClCompile.BrowseInformationFile)"
BufferSecurityCheck ="%(ClCompile.BufferSecurityCheck)"
CallingConvention ="%(ClCompile.CallingConvention)"
CompileAsManaged ="%(ClCompile.CompileAsManaged)"
CompileAs ="%(ClCompile.CompileAs)"
DebugInformationFormat ="%(ClCompile.DebugInformationFormat)"
DisableLanguageExtensions ="%(ClCompile.DisableLanguageExtensions)"
DisableSpecificWarnings ="%(ClCompile.DisableSpecificWarnings)"
EnableEnhancedInstructionSet ="%(ClCompile.EnableEnhancedInstructionSet)"
EnableFiberSafeOptimizations ="%(ClCompile.EnableFiberSafeOptimizations)"
EnablePREfast ="%(ClCompile.EnablePREfast)"
ErrorReporting ="%(ClCompile.ErrorReporting)"
ExceptionHandling ="%(ClCompile.ExceptionHandling)"
ExcludedInputPaths ="$(ExcludePath)"
ExpandAttributedSource ="%(ClCompile.ExpandAttributedSource)"
FavorSizeOrSpeed ="%(ClCompile.FavorSizeOrSpeed)"
FloatingPointExceptions ="%(ClCompile.FloatingPointExceptions)"
FloatingPointModel ="%(ClCompile.FloatingPointModel)"
ForceConformanceInForLoopScope ="%(ClCompile.ForceConformanceInForLoopScope)"
ForcedIncludeFiles ="%(ClCompile.ForcedIncludeFiles)"
ForcedUsingFiles ="%(ClCompile.ForcedUsingFiles)"
FunctionLevelLinking ="%(ClCompile.FunctionLevelLinking)"
GenerateXMLDocumentationFiles ="%(ClCompile.GenerateXMLDocumentationFiles)"
IgnoreStandardIncludePath ="%(ClCompile.IgnoreStandardIncludePath)"
InlineFunctionExpansion ="%(ClCompile.InlineFunctionExpansion)"
IntrinsicFunctions ="%(ClCompile.IntrinsicFunctions)"
MinimalRebuild ="%(ClCompile.MinimalRebuild)"
MultiProcessorCompilation ="%(ClCompile.MultiProcessorCompilation)"
ObjectFileName ="%(ClCompile.ObjectFileName)"
OmitDefaultLibName ="%(ClCompile.OmitDefaultLibName)"
OmitFramePointers ="%(ClCompile.OmitFramePointers)"
OpenMPSupport ="%(ClCompile.OpenMPSupport)"
Optimization ="%(ClCompile.Optimization)"
PrecompiledHeader ="%(ClCompile.PrecompiledHeader)"
PrecompiledHeaderFile ="%(ClCompile.PrecompiledHeaderFile)"
PrecompiledHeaderOutputFile ="%(ClCompile.PrecompiledHeaderOutputFile)"
PreprocessKeepComments ="%(ClCompile.PreprocessKeepComments)"
PreprocessorDefinitions ="%(ClCompile.PreprocessorDefinitions)"
PreprocessSuppressLineNumbers ="%(ClCompile.PreprocessSuppressLineNumbers)"
PreprocessToFile ="%(ClCompile.PreprocessToFile)"
ProcessorNumber ="%(ClCompile.ProcessorNumber)"
ProgramDataBaseFileName ="%(ClCompile.ProgramDataBaseFileName)"
RuntimeLibrary ="%(ClCompile.RuntimeLibrary)"
RuntimeTypeInfo ="%(ClCompile.RuntimeTypeInfo)"
ShowIncludes ="%(ClCompile.ShowIncludes)"
SmallerTypeCheck ="%(ClCompile.SmallerTypeCheck)"
StringPooling ="%(ClCompile.StringPooling)"
StructMemberAlignment ="%(ClCompile.StructMemberAlignment)"
SuppressStartupBanner ="%(ClCompile.SuppressStartupBanner)"
TreatSpecificWarningsAsErrors ="%(ClCompile.TreatSpecificWarningsAsErrors)"
TreatWarningAsError ="%(ClCompile.TreatWarningAsError)"
TreatWChar_tAsBuiltInType ="%(ClCompile.TreatWChar_tAsBuiltInType)"
UndefineAllPreprocessorDefinitions ="%(ClCompile.UndefineAllPreprocessorDefinitions)"
UndefinePreprocessorDefinitions ="%(ClCompile.UndefinePreprocessorDefinitions)"
UseFullPaths ="%(ClCompile.UseFullPaths)"
UseUnicodeForAssemblerListing ="%(ClCompile.UseUnicodeForAssemblerListing)"
WarningLevel ="%(ClCompile.WarningLevel)"
WholeProgramOptimization ="%(ClCompile.WholeProgramOptimization)"
XMLDocumentationFileName ="%(ClCompile.XMLDocumentationFileName)"
CreateHotpatchableImage ="%(CLCompile.CreateHotpatchableImage)"

TrackerLogDirectory ="%(ClCompile.TrackerLogDirectory)"

TLogReadFiles ="@(CLTLogReadFiles)"
TLogWriteFiles ="@(CLTLogWriteFiles)"
ToolExe ="$(CLToolExe)"
ToolPath ="$(CLToolPath)"
TrackFileAccess ="$(TrackFileAccess)"
MinimalRebuildFromTracking ="%(ClCompile.MinimalRebuildFromTracking)"
ToolArchitecture ="$(CLToolArchitecture)"
TrackerFrameworkPath ="$(CLTrackerFrameworkPath)"
TrackerSdkPath ="$(CLTrackerSdkPath)"
TrackedInputFilesToIgnore ="@(ClNoDependencies)"

AcceptableNonZeroExitCodes ="%(ClCompile.AcceptableNonZeroExitCodes)"
YieldDuringToolExecution ="$(ClYieldDuringToolExecution)"
>
</CL>

我尝试重新安装 7.1 SDK,但每次尝试安装文件。这是造成这种情况的原因吗?

最佳答案

这为我解决了问题:

首先,我遇到了一个找不到 WindowSDKDir 属性的错误。我必须转到项目的设置->配置属性->常规->平台工具集并将其更改为 Windows7.1SDK

然后,我遇到了 Required file ""is missing 错误。我必须打开 regedit 并更改:

HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\CurrentInstallFolder

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1\C:\Program Files\Microsoft SDKs\Windows\v7.1\(删除了 (x86))。

之后,CL.exe 退出,代码为 -1073741515。我必须将以下内容添加到我的路径中:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE

完成所有工作后,事实证明我正在构建的项目使用了一些仅随 Visual Studio 2010 提供的包含文件,因此无论如何我都必须安装整个该死的东西。

希望这对其他人有帮助,我没有浪费我的下午。 :P

关于c++ - Microsoft.Cpp.Win32.Targets(62,5) : error : Required file "" is missing,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31324732/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com