Discussion:
VC++ 2010 build problems
(too old to reply)
Anthony Wieser
2010-05-13 09:37:01 UTC
Permalink
I've just downloaded the trial version of VS2010 pro with a view to
upgrading, loaded up one of my existing projects, and (fingers crossed)
pressed the build button.

Unfortunatley, I've fallen at the first hurdle.

My project includes an HTML help workshop hhp file, to build it's CHM file,
and that is built as a custom build step, like this:
hhc.exe .\hlp\%(Filename).hhp

Unfortunately, hhc.exe returns an error code of 1 when it works, resulting
in the following MSBUILD error:
1>C:\Program
Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error
MSB6006: "cmd.exe" exited with code 1.

That error is contained here:
<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)"
</CustomBuild>

I've searched for AcceptableNonZeroExitCodes but can't find anything to
enlighten me on how to accept 1 as a valid code.

Any ideas?
--
Anthony Wieser
Wieser Software Ltd
Ismo Salonen
2010-05-14 04:28:54 UTC
Permalink
Post by Anthony Wieser
I've just downloaded the trial version of VS2010 pro with a view to
upgrading, loaded up one of my existing projects, and (fingers crossed)
pressed the build button.
Unfortunatley, I've fallen at the first hurdle.
My project includes an HTML help workshop hhp file, to build it's CHM
hhc.exe .\hlp\%(Filename).hhp
Unfortunately, hhc.exe returns an error code of 1 when it works,
1>C:\Program
error MSB6006: "cmd.exe" exited with code 1.
<CustomBuild
BuildSuffix ="$(BuildSuffix)"
TrackerLogDirectory ="%(CustomBuild.TrackerLogDirectory)"
MinimalRebuildFromTracking
="%(CustomBuild.MinimalRebuildFromTracking)"
TrackFileAccess ="$(TrackFileAccess)"
ToolArchitecture ="$(CustomBuildToolArchitecture)"
TrackerFrameworkPath ="$(CustomBuildTrackerFrameworkPath)"
TrackerSdkPath ="$(CustomBuildTrackerSdkPath)"
AcceptableNonZeroExitCodes
="%(CustomBuild.AcceptableNonZeroExitCodes)"
</CustomBuild>
I've searched for AcceptableNonZeroExitCodes but can't find anything to
enlighten me on how to accept 1 as a valid code.
Any ideas?
Create an helper bat which exists with wanted error code ?

ismo
Ulrich Eckhardt
2010-05-14 07:17:13 UTC
Permalink
Post by Anthony Wieser
My project includes an HTML help workshop hhp file, to build it's CHM
hhc.exe .\hlp\%(Filename).hhp
Unfortunately, hhc.exe returns an error code of 1 when it works, resulting
1>C:\Program
Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error
MSB6006: "cmd.exe" exited with code 1.
Hmm, last time I looked (VS2005) you could define multiple lines for the
custom build step:

hhc.exe ...
if %ERRORLEVEL%==1 (
exit /b 0
) else (
echo hhc failed with errorcode %ERRORLEVEL%
exit /b 1
)

Uli
--
C++ FAQ: http://parashift.com/c++-faq-lite

Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
Loading...