Doxygen isn't generating documentation for source files
Asked Answered
A

3

12

First time using Doxygen here. Using the Doxygen Wizard, and I'm pretty sure I'm setting all the directories and everything correctly but for some reason the outputted documentation only has the header files. My project is written in C, and it's like it is just completely ignoring the .c source files and only grabbing the .h header files from the directory.

I'm assuming it is simply I'm not checking one of the options I need or one is checked that shouldn't be. My input FILE_PATTERNS include .c and .h, along with a bunch of other ones, and yet it still won't create documentation for .c files.

Any idea why it is doing this? I'm not sure what else I can include here to help you guys out with understanding my problem, so just let me know if you need me to include anything else.

UPDATE: I found a setting to at least show the .c files in the html output but there is still no source code documentation for them. I have no idea why it cannot create the source code documentation but it can recognize and display all the functions and variables within them.

Input configuration is as follows:

INPUT                  = "C:/Users/Me/Desktop/ProjectFoler/Project"
INPUT_ENCODING         = UTF-8
FILE_PATTERNS          = *.c \
                         *.cc \
                         *.cxx \
                         *.cpp \
                         *.c++ \
                         *.java \
                         *.ii \
                         *.ixx \
                         *.ipp \
                         *.i++ \
                         *.inl \
                         *.idl \
                         *.ddl \
                         *.odl \
                         *.h \
                         *.hh \
                         *.hxx \
                         *.hpp \
                         *.h++ \
                         *.cs \
                         *.d \
                         *.php \
                         *.php4 \
                         *.php5 \
                         *.phtml \
                         *.inc \
                         *.m \
                         *.markdown \
                         *.md \
                         *.mm \
                         *.dox \
                         *.py \
                         *.f90 \
                         *.f \
                         *.for \
                         *.tcl \
                         *.vhd \
                         *.vhdl \
                         *.ucf \
                         *.qsf \
                         *.as \
                         *.js
RECURSIVE              = YES
EXCLUDE                = 
EXCLUDE_SYMLINKS       = NO
EXCLUDE_PATTERNS       = 
EXCLUDE_SYMBOLS        = 
EXAMPLE_PATH           = 
EXAMPLE_PATTERNS       = *
EXAMPLE_RECURSIVE      = NO
IMAGE_PATH             = 
INPUT_FILTER           = 
FILTER_PATTERNS        = 
FILTER_SOURCE_FILES    = NO
FILTER_SOURCE_PATTERNS = 
USE_MDFILE_AS_MAINPAGE = 

The folder structure I don't think would be making a difference because the source files along with the header files are directly in the top layer of the source code directory I provide for Doxygen. But I mean there are subfolders, just with nothing important in them.

Antagonize answered 18/6, 2014 at 22:11 Comment(3)
To help us, can you show your INPUT line, whether you have set RECURSIVE to YES and give a rough description of your folder structure. Do your C files have \file doxygen comments?Precatory
Ok I updated my question with your requested information. And I don't have any doxygen comments. I'm not even sure what that is to be honest.Antagonize
For info, by "doxygen comment" I mean one beginning /**. These are the comment blocks doxygen processes to document the code. Without them, your output will be quite minimal. Doxygen comments optionally contain commands to annotate what the comment is for. for example \file identifies the comment as the description of the source code file. HTH.Precatory
A
3

I think I may have solved it. There seems to be source code documentation for .c source files now after changing the settings as shown in the image below.

enter image description here

Antagonize answered 19/6, 2014 at 17:25 Comment(0)
M
29

In The Doxyfile, set EXTRACT_ALL = YES.

Default Value is NO.

This will document all the entities, without the requirement of any Doxygen Special comments.

Mud answered 21/3, 2015 at 5:51 Comment(1)
You may also need the RECURSIVE = YES flag in case you have sub-directories.Coen
A
3

I think I may have solved it. There seems to be source code documentation for .c source files now after changing the settings as shown in the image below.

enter image description here

Antagonize answered 19/6, 2014 at 17:25 Comment(0)
M
1

The answer from user3598862 (EXTRACT_ALL = YES) gets the job done, but is a sledgehammer. I prefer to leave that setting off and include each .c file I want by adding the 'file' command to the top of the file.

/**
 * @file
 * Application-level setup.
 */

I see this command referenced in some of the comments. I'm adding this as an answer for visibility.

Montana answered 1/12, 2023 at 0:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.