我正在尝试编译和构建我的测试程序。但是,我收到以下错误。
Making help file...
'".\makehelp.bat"' is not recognized as an internal or external command,
operable program or batch file.
Error executing c:\windows\system32\cmd.exe.
hpled6_2565.exe - 1 error(s), 0 warning(s)
你知道我怎么解决它吗?我使用的是Visual C ++ 6.0标准版。
答案 0 :(得分:0)
'".\makehelp.bat"' is not recognized as an internal or external command,
operable program or batch file.
Error executing c:\windows\system32\cmd.exe.
以上似乎表明您的测试程序缺少makehelp.bat
文件。
这本身很容易修复,只需将XYZ
替换为VC6自动生成的模板中的项目名称(下面复制),并将其保存为项目目录中的makehelp.bat
。
@echo off
REM -- First make map file from Microsoft Visual C++ generated resource.h
echo // MAKEHELP.BAT generated Help Map file. Used by XYZ.HPJ. >"hlp\XYZ.hm"
echo. >>"hlp\XYZ.hm"
echo // Commands (ID_* and IDM_*) >>"hlp\XYZ.hm"
makehm ID_,HID_,0x10000 IDM_,HIDM_,0x10000 resource.h >>"hlp\XYZ.hm"
echo. >>"hlp\XYZ.hm"
echo // Prompts (IDP_*) >>"hlp\XYZ.hm"
makehm IDP_,HIDP_,0x30000 resource.h >>"hlp\XYZ.hm"
echo. >>"hlp\XYZ.hm"
echo // Resources (IDR_*) >>"hlp\XYZ.hm"
makehm IDR_,HIDR_,0x20000 resource.h >>"hlp\XYZ.hm"
echo. >>"hlp\XYZ.hm"
echo // Dialogs (IDD_*) >>"hlp\XYZ.hm"
makehm IDD_,HIDD_,0x20000 resource.h >>"hlp\XYZ.hm"
echo. >>"hlp\XYZ.hm"
echo // Frame Controls (IDW_*) >>"hlp\XYZ.hm"
makehm IDW_,HIDW_,0x50000 resource.h >>"hlp\XYZ.hm"
REM -- Make help for Project XYZ
echo Building Win32 Help files
start /wait hcw /C /E /M "hlp\XYZ.hpj"
if errorlevel 1 goto :Error
if not exist "hlp\XYZ.hlp" goto :Error
if not exist "hlp\XYZ.cnt" goto :Error
echo.
if exist Debug\nul copy "hlp\XYZ.hlp" Debug
if exist Debug\nul copy "hlp\XYZ.cnt" Debug
if exist Release\nul copy "hlp\XYZ.hlp" Release
if exist Release\nul copy "hlp\XYZ.cnt" Release
echo.
goto :done
:Error
echo hlp\XYZ.hpj(1) : error: Problem encountered creating help file
:done
echo.
但是,要实现此目的,您还需要resource.h
遵循VC6资源ID约定以及相应的.hpj
和.cnt
文件。
此外,您应该知道即使您使用它,最终结果也将是自Vista以来已被弃用的HLP文件,并且需要单独的WinHlp32安装才能查看({{ 3}})。