0

chm file generated by doxygen displays incorrectly.

See this pic:

I'm trying to compile a chm help file using doxygen, all the html files were generated without any problem. The chm file was generated too (even though there is an error message "failed to run html help compiler on index.hhp" in the doxygen output logs, but the file size of this chm file seems to be normal) but when I open it, the help file viewer just shows

"Can’t reach this page Make sure the web address //ieframe.dll/dnserrordiagoff.htm# is correct ..."

Here are the related doxygen configs I used:

GENERATE_HTMLHELP      = YES

HHC_LOCATION           = "C:\Program Files (x86)\HTML Help Workshop\hhc.exe"

and my doxygen version is 1.9.6

What are the possible reasons?

  • Have you tried the answers in similar Stack Overflow questions: I see [one that suggests trying copying the file locally](https://stackoverflow.com/a/30649261/4166522) if it's on a network share, and [one that suggests looking in properties for an Unblock button](https://stackoverflow.com/a/11438732/4166522) and even [one that suggests ensuring all your Windows updates are current](https://stackoverflow.com/a/53641870/4166522)? – Rich N May 22 '23 at 10:03
  • What happens when you run: "C:\Program Files (x86)\HTML Help Workshop\hhc.exe" html\index.hhp ? Please show what you see you run doxygen in quiet mode and with the debug option `extcmd` so `doxygen -q -d extcmd Doxyfile` Whare there asterisks (`*`) after the word `YES`? – albert May 22 '23 at 10:03
  • @albert thanks for your advice, when I directly run the hhc with the index.hhp, it just shows warnings about some Keyword strings are too long. and I got the same result. – 国是好谈 May 22 '23 at 10:30
  • 1
    is the resulting chm file on your local drive or on a network drive? In case it is on a network drive please copy the chm file to a local drive and try again (as suggested by one of the answers as suggested by @RichN ). Can you give an example of the shown warnings? – albert May 22 '23 at 10:50
  • @albert the chm file is on my local drive and warning messages are saying that the key word string "{a very long template class difinition}" is too long. – 国是好谈 May 23 '23 at 01:38
  • I remember the problem with the long key word, this has been fixed in the 1.9.7 version (see https://github.com/doxygen/doxygen/pull/9919) also some other problems regarding CHM files were solved (see https://github.com/doxygen/doxygen/pull/9917 and https://github.com/doxygen/doxygen/pull/9919\2) so best is to update to 1.9.7 (released May 18, 2023) and recheck. – albert May 23 '23 at 07:31

1 Answers1

2

After investigation of my source code, I located the cause of this issue:

a function definition (with too many parameters) in a .h file is too long. Things goes away after I reduced the length of the parameter list of this function.

According to the information from @Albert, the latest doxygen release 1.9.7 at May 19 fixed this issue, and I did a check using this version, it did work.

  • Please have a look at [Can I answer my own question?](http://stackoverflow.com/help/self-answer) and come back two days later and check as answered if you have more than 15 reputation (See also: [Accept Your Own Answers](https://stackoverflow.blog/2009/01/06/accept-your-own-answers/). – help-info.de May 24 '23 at 07:10
  • Did you try with the doxygen version 1.9.7? on the original sources as when it doesn't work with that version we have to look deeper. Also post the offending line so we can see if the problem is solved or not. – albert May 24 '23 at 10:06
  • 1
    @albert Yes, the latest version fixed it! – 国是好谈 May 24 '23 at 10:24