Doxygen warning: documented function not declared or defined
Solution 1
My guess is that Doxygen is not parsing the Analysis/Accept.h
header file, so it's not seeing the Analysis
class declaration. In the output log, check that Analysis/Accept.h
is indeed being processed.
To ensure that Doxygen parses the Analysis
directory, you may have to add additional source directories in Expert->Input (in the Doxygen GUI frontend), and/or enable the Recursive option. Perhaps you have to specify a source directory one level above the one you've currently specified.
Solution 2
I was having the same problem, and followed the advice given by Emile Cormier. In my case the relevant header file was indeed not being parsed. This was because I have a c++ header file with the extension .h. I originally had the following in my Doxygen.in file:
EXTENSION_MAPPING = .h=C++
Looking at the output carefully, I noticed the statement: "Adding custom extension mapping: ..h will be treated as language c++", indicating an extra ".". Removing the period from the relevant line fixed my problem.
d3pd
Updated on June 27, 2022Comments
-
d3pd about 2 years
I'm trying to use Doxygen for the first time. On running Doxygen, I am presented with a large number of warnings of the following form:
<code>.cxx:<line number>: warning: documented function `<function>::<function>' was not declared or defined.
I'm not sure how to approach the problem. I'm working with a large C++ package and this type of warning is thrown up a few hundred times on running Doxygen.
Here's more specific information:
example warning:
Accept.cxx:14: warning: documented function `Accept::Accept' was not declared or defined.
corresponding example section of code:
#include "Analysis/Accept.h" #include "Analysis/Cutflow.h" #include "GlaNtp/GlaUtil/Steer/Steer.h" #include <iostream> Accept::Accept(unsigned int cutmask, unsigned int invertword, StringIntMap* CutTypeMap, Cutflow* analysis_cutflow): m_cutmask(cutmask), m_invertword(invertword), m_cutword(0),m_cutword_set(false), m_CutTypeMap(CutTypeMap), m_analysis_cutflow(analysis_cutflow){ // this is constructor InitBitOrder(); } Accept::~Accept(){} void Accept::setCutWord(const unsigned int &cutword){ m_cutword_set = true; m_cutword = cutword; } bool Accept::didBitPass(){ //std::cout << "Rick Evnt Pass: " << rickTestCutWord() << std::endl; return testCutWord(); } void Accept::InitBitOrder(){ Steer* bitorsteer=new Steer(); std::string configfile="ConFigFiles/ApplyBits/BitOrderConfigurationFile.txt"; if(!bitorsteer->ReadFile(configfile)){ std::cout << "Fatal ERROR: Failed to read Bit Order configuration steering file: " << configfile << std::endl; delete bitorsteer; bitorsteer=0; exit(1); } m_bitOrderMap = new StringIntMap("BitOrder", bitorsteer);// bit order delete bitorsteer; }
I would appreciate any assistance you might have in pointing me in the right direction.
Preemptive thanks