I have a mature FORTRAN code which I would like to modernise and as part of this process incorporate DOXYGEN comments throughout. The code contains header files which contain lists of variables (and previously common blocks) that could then be included in subroutines where access to these variables are required. Regardless of what I do, I can not get DOXYGEN (1.8.13) to process these files. I have written a simpler example involving three files below to show what I mean:
And for completeness, the FORTRAN program which makes use of this module (PROG.f):
PROGRAMPROGUSEEXAMPLECALLEXSUBEND
When I try to doxygen this, the HTML output successfully shows VARGROUP1 and VARGROUP3. However, VARGROUP2 (as defined in the VARIABLES.h file) are not present. I have tried many options in DOXYGEN such as 'FORCE_LOCAL_INCLUDES', 'ENABLE_PREPROESSING', 'MACRO_EXPANSION' and 'SEARCH_INCLUDES'.
Any help you can offer would be much appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
UPDATE: after posting, I noticed there was a more recent (bleeding edge) version of DOXYGEN available (1.8.19). Unfortunately, none of my variable groups appear in the DOXYGEN HTML output !!!!!! ARGHHHH
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good suggestion Paul. I think I am requesting doxygen to process the .h files (see extension mapping and/or list of file types in 'FILE_PATTERNS' below.
For completeness, this is the configuration generated by doxywizrd:
# Doxyfile 1.8.13#---------------------------------------------------------------------------# Project related configuration options#---------------------------------------------------------------------------DOXYFILE_ENCODING=UTF-8PROJECT_NAME="Example which does not work"PROJECT_NUMBER=PROJECT_BRIEF=PROJECT_LOGO=OUTPUT_DIRECTORY=/home/USER/SCRATCH/OFFICIAL_CHANGE/TEST/doxytest/OUTPUTCREATE_SUBDIRS=NOALLOW_UNICODE_NAMES=NOOUTPUT_LANGUAGE=EnglishBRIEF_MEMBER_DESC=YESREPEAT_BRIEF=YESABBREVIATE_BRIEF="The $name class"\
"The $name widget"\
"The $name file"\
is\
provides\
specifies\
contains\
represents\
a\
an\
theALWAYS_DETAILED_SEC=NOINLINE_INHERITED_MEMB=NOFULL_PATH_NAMES=YESSTRIP_FROM_PATH=STRIP_FROM_INC_PATH=SHORT_NAMES=NOJAVADOC_AUTOBRIEF=NOQT_AUTOBRIEF=NOMULTILINE_CPP_IS_BRIEF=NOINHERIT_DOCS=YESSEPARATE_MEMBER_PAGES=NOTAB_SIZE=4ALIASES=TCL_SUBST=OPTIMIZE_OUTPUT_FOR_C=NOOPTIMIZE_OUTPUT_JAVA=NOOPTIMIZE_FOR_FORTRAN=YESOPTIMIZE_OUTPUT_VHDL=NOEXTENSION_MAPPING="EXTENSION_MAPPING= .h=fortran"MARKDOWN_SUPPORT=YESTOC_INCLUDE_HEADINGS=0AUTOLINK_SUPPORT=YESBUILTIN_STL_SUPPORT=NOCPP_CLI_SUPPORT=NOSIP_SUPPORT=NOIDL_PROPERTY_SUPPORT=YESDISTRIBUTE_GROUP_DOC=NOGROUP_NESTED_COMPOUNDS=NOSUBGROUPING=YESINLINE_GROUPED_CLASSES=NOINLINE_SIMPLE_STRUCTS=NOTYPEDEF_HIDES_STRUCT=NOLOOKUP_CACHE_SIZE=0#---------------------------------------------------------------------------# Build related configuration options#---------------------------------------------------------------------------EXTRACT_ALL=YESEXTRACT_PRIVATE=YESEXTRACT_PACKAGE=YESEXTRACT_STATIC=YESEXTRACT_LOCAL_CLASSES=YESEXTRACT_LOCAL_METHODS=YESEXTRACT_ANON_NSPACES=YESHIDE_UNDOC_MEMBERS=NOHIDE_UNDOC_CLASSES=NOHIDE_FRIEND_COMPOUNDS=NOHIDE_IN_BODY_DOCS=NOINTERNAL_DOCS=YESCASE_SENSE_NAMES=YESHIDE_SCOPE_NAMES=NOHIDE_COMPOUND_REFERENCE=NOSHOW_INCLUDE_FILES=YESSHOW_GROUPED_MEMB_INC=YESFORCE_LOCAL_INCLUDES=YESINLINE_INFO=YESSORT_MEMBER_DOCS=YESSORT_BRIEF_DOCS=YESSORT_MEMBERS_CTORS_1ST=YESSORT_GROUP_NAMES=YESSORT_BY_SCOPE_NAME=YESSTRICT_PROTO_MATCHING=NOGENERATE_TODOLIST=YESGENERATE_TESTLIST=YESGENERATE_BUGLIST=YESGENERATE_DEPRECATEDLIST=YESENABLED_SECTIONS=MAX_INITIALIZER_LINES=30SHOW_USED_FILES=YESSHOW_FILES=YESSHOW_NAMESPACES=YESFILE_VERSION_FILTER=LAYOUT_FILE=CITE_BIB_FILES=#---------------------------------------------------------------------------# Configuration options related to warning and progress messages#---------------------------------------------------------------------------QUIET=NOWARNINGS=YESWARN_IF_UNDOCUMENTED=YESWARN_IF_DOC_ERROR=YESWARN_NO_PARAMDOC=NOWARN_AS_ERROR=NOWARN_FORMAT="$file:$line: $text"WARN_LOGFILE=#---------------------------------------------------------------------------# Configuration options related to the input files#---------------------------------------------------------------------------INPUT=/home/USER/SCRATCH/OFFICIAL_CHANGE/TEST/doxytestINPUT_ENCODING=UTF-8FILE_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\
*.pyw\
*.f90\
*.f95\
*.f03\
*.f08\
*.f\
*.for\
*.tcl\
*.vhd\
*.vhdl\
*.ucf\
*.qsfRECURSIVE=YESEXCLUDE=EXCLUDE_SYMLINKS=NOEXCLUDE_PATTERNS=EXCLUDE_SYMBOLS=EXAMPLE_PATH=EXAMPLE_PATTERNS=*EXAMPLE_RECURSIVE=NOIMAGE_PATH=INPUT_FILTER=FILTER_PATTERNS=FILTER_SOURCE_FILES=NOFILTER_SOURCE_PATTERNS=USE_MDFILE_AS_MAINPAGE=#---------------------------------------------------------------------------# Configuration options related to source browsing#---------------------------------------------------------------------------SOURCE_BROWSER=YESINLINE_SOURCES=YESSTRIP_CODE_COMMENTS=YESREFERENCED_BY_RELATION=YESREFERENCES_RELATION=YESREFERENCES_LINK_SOURCE=YESSOURCE_TOOLTIPS=YESUSE_HTAGS=YESVERBATIM_HEADERS=YESCLANG_ASSISTED_PARSING=NOCLANG_OPTIONS=#---------------------------------------------------------------------------# Configuration options related to the alphabetical class index#---------------------------------------------------------------------------ALPHABETICAL_INDEX=YESCOLS_IN_ALPHA_INDEX=5IGNORE_PREFIX=#---------------------------------------------------------------------------# Configuration options related to the HTML output#---------------------------------------------------------------------------GENERATE_HTML=YESHTML_OUTPUT=htmlHTML_FILE_EXTENSION=.htmlHTML_HEADER=HTML_FOOTER=HTML_STYLESHEET=HTML_EXTRA_STYLESHEET=HTML_EXTRA_FILES=HTML_COLORSTYLE_HUE=220HTML_COLORSTYLE_SAT=100HTML_COLORSTYLE_GAMMA=80HTML_TIMESTAMP=NOHTML_DYNAMIC_SECTIONS=NOHTML_INDEX_NUM_ENTRIES=100GENERATE_DOCSET=NODOCSET_FEEDNAME="Doxygen generated docs"DOCSET_BUNDLE_ID=org.doxygen.ProjectDOCSET_PUBLISHER_ID=org.doxygen.PublisherDOCSET_PUBLISHER_NAME=PublisherGENERATE_HTMLHELP=NOCHM_FILE=HHC_LOCATION=GENERATE_CHI=NOCHM_INDEX_ENCODING=BINARY_TOC=NOTOC_EXPAND=NOGENERATE_QHP=NOQCH_FILE=QHP_NAMESPACE=org.doxygen.ProjectQHP_VIRTUAL_FOLDER=docQHP_CUST_FILTER_NAME=QHP_CUST_FILTER_ATTRS=QHP_SECT_FILTER_ATTRS=QHG_LOCATION=GENERATE_ECLIPSEHELP=NOECLIPSE_DOC_ID=org.doxygen.ProjectDISABLE_INDEX=NOGENERATE_TREEVIEW=NOENUM_VALUES_PER_LINE=4TREEVIEW_WIDTH=250EXT_LINKS_IN_WINDOW=NOFORMULA_FONTSIZE=10FORMULA_TRANSPARENT=YESUSE_MATHJAX=NOMATHJAX_FORMAT=HTML-CSSMATHJAX_RELPATH=http://cdn.mathjax.org/mathjax/latestMATHJAX_EXTENSIONS=MATHJAX_CODEFILE=SEARCHENGINE=YESSERVER_BASED_SEARCH=NOEXTERNAL_SEARCH=NOSEARCHENGINE_URL=SEARCHDATA_FILE=searchdata.xmlEXTERNAL_SEARCH_ID=EXTRA_SEARCH_MAPPINGS=#---------------------------------------------------------------------------# Configuration options related to the LaTeX output#---------------------------------------------------------------------------GENERATE_LATEX=YESLATEX_OUTPUT=latexLATEX_CMD_NAME=latexMAKEINDEX_CMD_NAME=makeindexCOMPACT_LATEX=NOPAPER_TYPE=a4EXTRA_PACKAGES=LATEX_HEADER=LATEX_FOOTER=LATEX_EXTRA_STYLESHEET=LATEX_EXTRA_FILES=PDF_HYPERLINKS=YESUSE_PDFLATEX=YESLATEX_BATCHMODE=NOLATEX_HIDE_INDICES=NOLATEX_SOURCE_CODE=NOLATEX_BIB_STYLE=plainLATEX_TIMESTAMP=NO#---------------------------------------------------------------------------# Configuration options related to the RTF output#---------------------------------------------------------------------------GENERATE_RTF=NORTF_OUTPUT=rtfCOMPACT_RTF=NORTF_HYPERLINKS=NORTF_STYLESHEET_FILE=RTF_EXTENSIONS_FILE=RTF_SOURCE_CODE=NO#---------------------------------------------------------------------------# Configuration options related to the man page output#---------------------------------------------------------------------------GENERATE_MAN=NOMAN_OUTPUT=manMAN_EXTENSION=.3MAN_SUBDIR=MAN_LINKS=NO#---------------------------------------------------------------------------# Configuration options related to the XML output#---------------------------------------------------------------------------GENERATE_XML=NOXML_OUTPUT=xmlXML_PROGRAMLISTING=YES#---------------------------------------------------------------------------# Configuration options related to the DOCBOOK output#---------------------------------------------------------------------------GENERATE_DOCBOOK=NODOCBOOK_OUTPUT=docbookDOCBOOK_PROGRAMLISTING=NO#---------------------------------------------------------------------------# Configuration options for the AutoGen Definitions output#---------------------------------------------------------------------------GENERATE_AUTOGEN_DEF=NO#---------------------------------------------------------------------------# Configuration options related to the Perl module output#---------------------------------------------------------------------------GENERATE_PERLMOD=NOPERLMOD_LATEX=NOPERLMOD_PRETTY=YESPERLMOD_MAKEVAR_PREFIX=#---------------------------------------------------------------------------# Configuration options related to the preprocessor#---------------------------------------------------------------------------ENABLE_PREPROCESSING=YESMACRO_EXPANSION=YESEXPAND_ONLY_PREDEF=NOSEARCH_INCLUDES=YESINCLUDE_PATH=INCLUDE_FILE_PATTERNS=PREDEFINED=EXPAND_AS_DEFINED=SKIP_FUNCTION_MACROS=YES#---------------------------------------------------------------------------# Configuration options related to external references#---------------------------------------------------------------------------TAGFILES=GENERATE_TAGFILE=ALLEXTERNALS=NOEXTERNAL_GROUPS=YESEXTERNAL_PAGES=YESPERL_PATH=/usr/bin/perl#---------------------------------------------------------------------------# Configuration options related to the dot tool#---------------------------------------------------------------------------CLASS_DIAGRAMS=NOMSCGEN_PATH=DIA_PATH=HIDE_UNDOC_RELATIONS=YESHAVE_DOT=YESDOT_NUM_THREADS=0DOT_FONTNAME=HelveticaDOT_FONTSIZE=10DOT_FONTPATH=CLASS_GRAPH=YESCOLLABORATION_GRAPH=YESGROUP_GRAPHS=YESUML_LOOK=NOUML_LIMIT_NUM_FIELDS=10TEMPLATE_RELATIONS=NOINCLUDE_GRAPH=YESINCLUDED_BY_GRAPH=YESCALL_GRAPH=NOCALLER_GRAPH=NOGRAPHICAL_HIERARCHY=YESDIRECTORY_GRAPH=YESDOT_IMAGE_FORMAT=pngINTERACTIVE_SVG=NODOT_PATH=DOTFILE_DIRS=MSCFILE_DIRS=DIAFILE_DIRS=PLANTUML_JAR_PATH=PLANTUML_CFG_FILE=PLANTUML_INCLUDE_PATH=DOT_GRAPH_MAX_NODES=50MAX_DOT_GRAPH_DEPTH=0DOT_TRANSPARENT=NODOT_MULTI_TARGETS=NOGENERATE_LEGEND=YESDOT_CLEANUP=YES
Last edit: Robert Gregg 2020-06-26
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem stems from the fact that Doygen expects all files (including the header files) to resemble fully formed FORTRAN files (i.e. they must comprise a module, subroutine or function. Given my header file merely had a snippet of code, Doxygen was having trouble processing the file.
If possible, I will delete the post here in preference to the stackoverflow thread to avoid duplication.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That sounds quite definitive. Is it a hard feature to add? Could I upload it myself? I even have respectable expertise link C and programming on POSIX systems. My enjoy in windows is confined.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I have a mature FORTRAN code which I would like to modernise and as part of this process incorporate DOXYGEN comments throughout. The code contains header files which contain lists of variables (and previously common blocks) that could then be included in subroutines where access to these variables are required. Regardless of what I do, I can not get DOXYGEN (1.8.13) to process these files. I have written a simpler example involving three files below to show what I mean:
MODULE.f
The included header file (VARIABLES.h):
And for completeness, the FORTRAN program which makes use of this module (PROG.f):
When I try to doxygen this, the HTML output successfully shows VARGROUP1 and VARGROUP3. However, VARGROUP2 (as defined in the VARIABLES.h file) are not present. I have tried many options in DOXYGEN such as 'FORCE_LOCAL_INCLUDES', 'ENABLE_PREPROESSING', 'MACRO_EXPANSION' and 'SEARCH_INCLUDES'.
Any help you can offer would be much appreciated.
UPDATE: after posting, I noticed there was a more recent (bleeding edge) version of DOXYGEN available (1.8.19). Unfortunately, none of my variable groups appear in the DOXYGEN HTML output !!!!!! ARGHHHH
I suspect that you need to show the details of your doxyfile?
Are you sure that you have asked to process the .h file?
Good suggestion Paul. I think I am requesting doxygen to process the .h files (see extension mapping and/or list of file types in 'FILE_PATTERNS' below.
For completeness, this is the configuration generated by doxywizrd:
Last edit: Robert Gregg 2020-06-26
Are you quite sure that
INPUT = /home/USER/SCRATCH/OFFICIAL_CHANGE/TEST/doxytest
directory contains your .h file?
Try changing it to .for ? to check if your alias is working as expected?
hi Paul,
thanks for the input. I asked the same question on stack overflow at the same time and sorted it out:
https://stackoverflow.com/questions/62592165/doxygen-fails-to-process-header-files-in-fortran-code
The problem stems from the fact that Doygen expects all files (including the header files) to resemble fully formed FORTRAN files (i.e. they must comprise a module, subroutine or function. Given my header file merely had a snippet of code, Doxygen was having trouble processing the file.
If possible, I will delete the post here in preference to the stackoverflow thread to avoid duplication.
That sounds quite definitive. Is it a hard feature to add? Could I upload it myself? I even have respectable expertise link C and programming on POSIX systems. My enjoy in windows is confined.