4

I am programming a project in Objective-C and I have started to use Doxygen to automatically generate documentation. A significant portion of the project contains basic C functions. Unfortunately Doxygen is not documenting C functions, only Objective-C classes and their methods. I have the functions defined in several header files like so:

BOOL myFunc(void);

Which I then have implemented in a .m.

Does Doxygen not detect straight C functions in Objective-C or is there an option I have to turn on? Is my function defined incorrectly for Doxygen?

1 Answer 1

2
+50

Doxygen certainly documents straight C functions.

After more testing

Use the Doxywizard and check the values in expert mode - it provides some nice help when you mouse over things. In particular, you should have changed the default so EXTRACT_ALL is checked

I think needing this to be set, opposite to the default, is possibly a bug.

If desperate, post the settings up in the question. I just created a sample from scratch and verified that your function showed up using Doxygen when I use EXTRACT_ALL but there is no File Members section if I turn that off.

You should see the functions underneath Files - File Members, as seen here in the VTK docs.

Sorry I didn't pick it up earlier but I always have EXTRACT_ALL on as I'm working on legacy code bases where most functions lack special comments.

earlier idea Try adding an @file comment at the top of the file to see if that is being processed.

   /// @file fred.h This file defines functions used in fred.m

My bet is that your file extension or your directory is not included in the doxygen setup file you're running.

Sign up to request clarification or add additional context in comments.

4 Comments

Nope its definitley getting processed. The files are listed in it. And I tried your @file thing no help. When running under Objective C does it stick to just methods and avoid c functions?
Ok that worked better it is now listing all of them which is great, but it is still not documenting them with the comments.
NVM I fixed it thank you so much! (I will you give you the bounty as soon as I can)
I found that setting EXTRACT_ALL did not fix it for me BUT, setting SHOW_FILES = YES fixes it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.