3

I am sure this is something silly I've done but I can't see what it is:

So I have c++ project which has a main.cpp file and some classes. It was not written with doxygen in mind (error #1) but I'm looking to correct my mistake and generate some documentation. So I installed doxygen and ran the doxygen GUI, entered the project name/synopsis and specified the source and destination locations.

Also to get some output above a function I added a comment in the style the doxygen spec requires:

//! My actual function doesn't really look like this
/*! 
 *  Some sample detail which isn't exactly the same as the main
 *  function but the structure is the same
 */
void sampleFunction()
{
    doSomethingUninteresting();
}

However when I hit run in doxywizard no extra comments are made.

If I set the extraction mode to documented entities only main.cpp doesn't even show up. If I set it to all entities main.cpp appears under files and the function is in there however there is no detail whatsoever in the file.

As a complete novice trying to retrofit my project no doubt I've omitted to do something important but all the documentation/tutorials I've read don't suggest anything other than what I've stated needs to be done so I turn to the knowledgeable SO community for assistance

UPDATE:

In response to the comment by Arne Mertz here are a few more details:

  • Doxywizard is in Program Files/doxygen/bin and the config file is wherever doxywizard creates it by default

  • My source code is in User/Desktop/

  • The output folder is in User/Desktop/Documentation

Community
  • 1
  • 1
DomAyre
  • 828
  • 1
  • 11
  • 23
  • Could you provide your doxygen configuration, as far as it affects extraction of documentation from source code files? A minimal but complete file to reproduce your problem would come in handy as well including the paths where the file is, where you run doxywizard, where the doxygen config is and what you have configured regarding paths in the config file. – Arne Mertz Sep 04 '14 at 10:19
  • I've updated the question with the information you requested :) – DomAyre Sep 04 '14 at 11:05
  • 1
    Also please, mention the name of someone to whom you're writing with the symbol `@` — so the person will be notified. I won't wonder if Ame Mertz doesn't even knew that you're answered to him. An exceptions is only the author of the post under which you write a comment. I.e. I didn't mentioned you, but you will be notified anyway. – Hi-Angel Sep 04 '14 at 12:06

2 Answers2

2

To document a global functions you have also to include a file name. E.g.

/*!
 * \file MyFileName.cpp
 * \brief a brief description of a file
 */

//! My actual function doesn't really look like this
/*! 
 *  Some sample detail which isn't exactly the same as the main
 *  function but the structure is the same
 */
void sampleFunction()
{
    doSomethingUninteresting();
}

Note, that the name after \file keyword should be exactly as the name of the file.

Hi-Angel
  • 4,933
  • 8
  • 63
  • 86
1

I was being foolish as I suspected, to be safe I'd made a copy of my project and so the version I was editing was not the version being interpreted by doxygen

I apologise to anyone who wasted their time trying to help with this but I very much appreciate your attempts to do so :)

DomAyre
  • 828
  • 1
  • 11
  • 23
  • I had the same problem like you. When I read your answer I laughed about it ("could have been me"). Well, not this time. I'm sure. Now, 1 hour later I remembered this and finally triple checked the path of the file I was editing and the one given to doxygen. OMG. Can't believe it, I've really edited the wrong file (in a copy of the project) -.- So everyone reading this answer: Double check and if that not helps, look somewhere else, but this is most likely the problem :/ – mozzbozz Jan 19 '15 at 16:20