Thread: [Doxygen-users] Getting started with Doxygen
Brought to you by:
dimitri
From: Daniel <dan...@zm...> - 2007-05-25 11:01:17
|
Hello all, I need basic help with Doxygen. My long term goal is to contribute OpenDocument output to Doxygen but first I need to start using the program myself :-) 1. I have installed Doxygen. I have version 1.4.6. 2. I have made a config file. 3. I'm in a directory ($ROOT) with several sub-directories full of PHP files. 4. I chose a function at random and added a Doxygen description for it. 5. I went to $ROOT and ran "doxygen my-config-file". I saw Doxygen run, and it created the appropriate sub-directories in the output directory I specified in the config files. But there is no documentation at all in these directories: $ cd $OUTOUT_DIRECTORY/html $ ls doxygen.css index.html tab_l.gif tabs.css doxygen.png tab_b.gif tab_r.gif $ I was expecting to find an HTML file for the one function I documented. Something like MyFunction.html, but as you can see it wasn't documented. I opened the index.php file and all it has is the HTML header and the project title from the config file, but nothing else. Does anyone know what I'm doing wrong? I notice this in the Doxygen output: Reading <$ROOT>/include/php/db_access.php... Parsing file <$ROOT>/include/php/db_access.php... Where <$ROOT> is the $ROOT directory I stated above. This is the file where I documented one function. This proves that Doxygen found the file and read it, so how come it didn't grab the documentation in it? Is it possible that I wrote the documentation wrong? This is what I have: /** * Returns the data necessary to authenticate an initial user login. * * \param login is either the full name or email of the user. * * \return An associative array: * user_id: The user ID. * password: The user password (the hash, actually). */ function db_read_login_data($login) { ... } Does that look alright? Btw, yes, this is a procedural program. Doxygen doesn't require OOP, does it? Any help would be very much appreciated. Cheers, Daniel. |
From: Daniel <dan...@zm...> - 2007-05-25 22:09:14
|
Hello again, I think that if someone shows me a very simple hello-world type of document with Doxygen on PHP I can work my way up to my real situation. Can anyone help? I'm stuck at the very beginning. I can't generate the most basic documentation with Doxygen. Help! Daniel. Daniel wrote: > Hello all, > > I need basic help with Doxygen. My long term goal is to contribute > OpenDocument output to Doxygen but first I need to start using the > program myself :-) > > 1. I have installed Doxygen. I have version 1.4.6. > 2. I have made a config file. > 3. I'm in a directory ($ROOT) with several sub-directories full of PHP > files. > 4. I chose a function at random and added a Doxygen description for it. > 5. I went to $ROOT and ran "doxygen my-config-file". > > I saw Doxygen run, and it created the appropriate sub-directories in the > output directory I specified in the config files. But there is no > documentation at all in these directories: > > $ cd $OUTOUT_DIRECTORY/html > $ ls > doxygen.css index.html tab_l.gif tabs.css > doxygen.png tab_b.gif tab_r.gif > $ > > I was expecting to find an HTML file for the one function I documented. > Something like MyFunction.html, but as you can see it wasn't documented. > I opened the index.php file and all it has is the HTML header and the > project title from the config file, but nothing else. > > Does anyone know what I'm doing wrong? > > I notice this in the Doxygen output: > > Reading <$ROOT>/include/php/db_access.php... > Parsing file <$ROOT>/include/php/db_access.php... > > Where <$ROOT> is the $ROOT directory I stated above. This is the file > where I documented one function. This proves that Doxygen found the file > and read it, so how come it didn't grab the documentation in it? > > Is it possible that I wrote the documentation wrong? This is what I have: > > /** > * Returns the data necessary to authenticate an initial user login. > * > * \param login is either the full name or email of the user. > * > * \return An associative array: > * user_id: The user ID. > * password: The user password (the hash, actually). > */ > function db_read_login_data($login) { > ... > } > > > Does that look alright? > > Btw, yes, this is a procedural program. Doxygen doesn't require OOP, > does it? > > Any help would be very much appreciated. > > Cheers, > Daniel. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Doxygen-users mailing list > Dox...@li... > https://lists.sourceforge.net/lists/listinfo/doxygen-users > |
From: Philipp M. <ph...@ma...> - 2007-05-26 08:32:47
|
On Samstag, 26. Mai 2007 Daniel wrote: > I think that if someone shows me a very simple hello-world type of > document with Doxygen on PHP I can work my way up to my real situation. > Can anyone help? I'm stuck at the very beginning. I can't generate the > most basic documentation with Doxygen. ... > > Is it possible that I wrote the documentation wrong? This is what I have: > > > > /** > > * Returns the data necessary to authenticate an initial user login. > > * > > * \param login is either the full name or email of the user. > > * > > * \return An associative array: > > * user_id: The user ID. > > * password: The user password (the hash, actually). > > */ > > function db_read_login_data($login) { > > ... > > } > > > > > > Does that look alright? Yes, it does. I guess that you have <?php in that file? Else doxygen won't find your php code. I'd guess that your doxygen configuration file does not say to read *.php (or .php4, or whatever), or that your input directory(ies) are wrong - possibly you did not say to recurse? Does doxygen on running say that it reads these files? Have a look at doxywizard (http://www.stack.nl/~dimitri/doxygen/doxywizard_usage.html). Regards, Phil -- Versioning your /etc, /home or even your whole installation? Try fsvs (fsvs.tigris.org)! |
From: Daniel <dan...@zm...> - 2007-05-26 09:50:49
|
Hi Philipp, Your suggestion to use the wizard "solved" the problem. I'll reply to all your suggestions anyways: Philipp Marek wrote: > Yes, it does. I guess that you have <?php in that file? Else doxygen won't > find your php code. I had "<?". Changing it to <?php made no difference. > I'd guess that your doxygen configuration file does not say to read *.php > (or .php4, or whatever), It's set to read *.php yes. > or that your input directory(ies) are wrong - > possibly you did not say to recurse? I checked those, and yes I have recurse. Doxygen was doing exactly what I would expect if I didn't have any documentation at all on the files. That is, it reads and parses the file but produces no documentation. > Does doxygen on running say that it reads these files? Yes. > Have a look at doxywizard > (http://www.stack.nl/~dimitri/doxygen/doxywizard_usage.html). Thanks! With the wizard I found a workable solution. This is what I did: 1. I went to Wizard > Mode 2. Under "Select the desired extraction mode" I changed "Documented entities only" to "All entities". Then I ran Doxygen again. This time it created all the documentation, 95% blank as I would expect, but in particular, it did find the one documentation bit I wrote and I see that function successfully documented in the HTML output. I don't understand why changing that setting would make the difference of whether Doxygen notices the one function that *is* documented, but clearly it did something and I'm happy with the result. Thanks for the help! Cheers, Daniel. |
From: Daniel <dan...@zm...> - 2007-05-26 09:23:36
|
Barrie Duncan wrote: > Hi Daniel. > > Have you set up your source directorys correctly in the config file? > > e.g. > INPUT = ..\src Yes. INPUT = "/home/daniel/INGOT/website/main-site" RECURSIVE = YES And the file that contains the documentation is: /home/daniel/INGOT/website/main-site/include/php/db_access.php And the console outout of Doxygen includes: Reading /home/daniel/INGOT/website/main-site/include/php/db_access.php... Parsing file /home/daniel/INGOT/website/main-site/include/php/db_access.php... Cheers, Daniel. |