So I'm new to using Doxygen and I was able to get it to work smoothly. I was able to document my classes and structs and it generates the HTML files perfectly. The issue I'm running into is it won't parse my main.cpp file. All the classes and structs have their own .h and .cpp files and they process fine. How do I get Doxygen to make the documentation for main.cpp? It doesn't have a .h file as this is where the program starts and ends. I wouldn't even know what to put in the .h file for main. I'm using Doxywizard in Windows.
Edit:
I put this in main and it generates a main page:
/**
@mainpage
This is a test application.
@author Alex
@date 10/21/2010
@version 1.0
*/
But then farther down the file where the function prototypes are I have this and it doesn't get parsed:
/**
@brief Error handler for the PDF writer.
It does nothing. It just has to exist.
*/
void error_handler (HPDF_STATUS error_no,
HPDF_STATUS detail_no,
void *user_data)
{
}
All C++ programs must have a main function. If you try to compile a C++ program without a main function, the compiler raises an error.
Doxygen is the de facto standard tool for generating documentation from annotated C++ sources, but it also supports other popular programming languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, and to some extent D.
I put this at the top of main.cpp and it worked. Go figure.
/**
@file main.cpp
*/
If INPUT
and FILE_PATTERNS
are empty, it should search for *.cpp files (and many other patterns) in the current directory. (This from the doxygen manual.)
Since yours are empty, I expect one of two things is going on if you're not getting main.cpp documentation:
If neither of these ideas solve your problem, we might need more information. Output of ls -R
, output of the doxygen run, etc. Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With