Hi Dimitri,

>> I am using doxygen 1.8.7 to document our embedded firmware repository.
>> There are a number of individual projects there each with its own main
>> function.
>
> In that case I typically suggest to do a doxygen run for each project 
> separately.

I really having it all together in one place.  I set up a decent amount 
of related pages that steer the user through it all and it is nice to 
have the overview of all the projects - particularly since many of them 
are master-slave type devices that share protocol files and in general 
go together.

I tried messing with tags somewhat but that did not work out very well 
for me.

>
>>
>> How do I \ref a specific one?  Obviously simply using \ref main picks
>> the first one doxygen finds.  I tried something like
>>
>> \ref deviceA_main.c#main
>>
>> but that did not work.
>>
>> Is there a way to do this?
>>
>
> No there is not. Wouldn't work correctly with automatic links.

That is a shame.  It seems like it might be possible to make some 
assumptions that would allow automatic link creation in most cases.  For 
example a prime one would be that void foo(); in \dir\bar.h goes with 
the void foo(){} in \dir\bar.c not the one in \dir2\bar.c.

Obviously there are plenty of ways for that to fall apart, but it is not 
a bad assumption.

A somewhat workable solution to this that does not require much trickery is:

#ifdef DOXY_BUILD
     #define main this_particular_project_main
#endif

void main()
{
}

Then of course you define DOXY_BUILD in doxygen.  This way you can at 
least \ref to a particular main from your related pages to get the 
reader to the root of it all easily.

I would not want to do it if I had a significant pattern that involved 
like-named static functions for example, but it works ok for this.

All the best,

Tom


PS  I am noticing that my posts to doxygen-users are no longer being 
echoed back to my email.  My earlier ones were.  Now I only see the 
replies.  Is there some setting for that in my account?




------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Doxygen-users mailing list
Doxygen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/doxygen-users

Reply via email to