"cmd.exe" exited with code 1

Problems building or running the engine, queries about how to use features etc.
Post Reply
Posts: 2
Joined: Thu Apr 18, 2019 4:46 pm

"cmd.exe" exited with code 1

Post by Angramme »

Ogre Version: :2.1:
Operating System: :windows 10:
Render System: :DirectX:
Compiler: :VS 2017:

I was trying to build Ogre 2.1 by following the tutorial in here: viewtopic.php?t=84572
But when compiling my dependencies I got completly different results with an error that I don't understand.

========== Build: 8 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

instead of

========== Build: 6 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

And my error is not really descriptive ("cmd.exe" exited with code 1). It's coming from SDL2 from file Microsoft.CppCommon.targets on line 209 that is: (look for "***************** this line >>>>>")

Code: Select all

<Target Name="CustomBuild"
          Condition="'@(CustomBuild)' != ''"

      <CustomBuildToolArchitecture Condition="'$(CustomBuildToolArchitecture)' == ''">Native32Bit</CustomBuildToolArchitecture>

    <!-- see if items were requested to build in parallel (ignored for selected files build)-->
    <ItemGroup Condition="'$(SelectedFiles)' == ''">
      <_ItemsToBuildInParallel Include="@(CustomBuild)" Condition="'%(CustomBuild.BuildInParallel)' == 'true'" />

      Condition                 ="'$(SelectedFiles)' == ''"
      Sources                   ="@(_ItemsToBuildInParallel)"
      OutputsMetadataName       ="Outputs"
      DependenciesMetadataName  ="AdditionalInputs"
      CommandMetadataName       ="Command"
      TLogDirectory             ="$(TLogLocation)"
      TLogNamePrefix            ="ParallelCustomBuild"
      CheckForInterdependencies ="true"
      <Output TaskParameter="OutOfDateSources" ItemName="_ParallelCustomBuild"/>
      <Output TaskParameter="HasInterdependencies" PropertyName="_HasInterdependencies"/>

      Condition       ="'@(_ParallelCustomBuild)' != ''"
      Sources         ="@(_ParallelCustomBuild)"
      MaxProcesses    ="%(_ParallelCustomBuild.MaxProcesses)"
      MaxItemsInBatch ="%(_ParallelCustomBuild.MaxItemsInBatch)"

    <ItemGroup Condition="'@(_ItemsToBuildInParallel)' != ''">
      <!-- if some custol build items have dependencies on other items outputs, we will build them all sequentially -->
      <CustomBuild Remove="@(_ItemsToBuildInParallel)" Condition="'$(_HasInterdependencies)' != 'true'" />
      <_ItemsToBuildInParallel Remove="@(_ItemsToBuildInParallel)" />
      <_ParallelCustomBuild Remove="@(_ParallelCustomBuild)" />

***************** this line >>>>>    <CustomBuild
      Sources                     ="@(CustomBuild)"
      BuildSuffix                 ="$(_BuildSuffix)"

      TrackerLogDirectory         ="%(CustomBuild.TrackerLogDirectory)"
      MinimalRebuildFromTracking  ="%(CustomBuild.MinimalRebuildFromTracking)"

      TLogReadFiles               ="@(CustomBuildTLogReadFiles)"
      TLogWriteFiles              ="@(CustomBuildTLogWriteFiles)"
      TrackFileAccess             ="$(TrackFileAccess)"
      ToolArchitecture            ="$(CustomBuildToolArchitecture)"
      TrackerFrameworkPath        ="$(CustomBuildTrackerFrameworkPath)"
      TrackerSdkPath              ="$(CustomBuildTrackerSdkPath)"

      AcceptableNonZeroExitCodes  ="%(CustomBuild.AcceptableNonZeroExitCodes)"
Could someone please help me with this?
Thanks in advance for help

Posts: 19
Joined: Thu Feb 14, 2019 11:27 am
x 3

Re: "cmd.exe" exited with code 1

Post by Hilarius86 »

I had a similar error when setting up a dummy environment for a colleague. Check your logs in the build folder for more information. My error, though probably unrelated (cmd exit code 3), directed me to a missing CMake installation.

Post Reply