Dan Champagne
Dan Champagne

Reputation: 920

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

Today, I went to create a new C++ project in Visual Studio 2010 Pro, and then I compile it, I'm getting the following two errors:

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

The first error points to this tag in the Microsoft.Cpp.Win32.Targets file:

<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>

I tried reinstalling the 7.1 SDK, however the installation files every time I try it. Is that what is causing this?

Upvotes: 2

Views: 4778

Answers (1)

Phillip
Phillip

Reputation: 619

This fixed it for me:

First, I had an error where it couldn't find the WindowSDKDir property. I had to go to my project's settings->Configuration Properties->General->Platform Toolset and change it to Windows7.1SDK.

Then, I had the Required file "" is missing error. I had to open regedit and change:

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

from C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1\ to C:\Program Files\Microsoft SDKs\Windows\v7.1\ (removed (x86)).

After that, CL.exe was exiting with code -1073741515. I had to add the following to my PATH:

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

After all that work, it turns out the project I'm building is using some include files that only come with Visual Studio 2010, so I have to go install the whole dang thing anyway.

Hopefully this is of help to someone else, and I haven't just wasted my afternoon. :P

Upvotes: 8

Related Questions