Clemens Feige | 5 Jan 2007 18:25
Favicon

Re: Newbie Doxygen DLL extern question

Hello Deeder.

You might have noticed what I think is the reason for your problem:
This [DllImport...] stuff in not "official" C. So doxygen gets 
confused. 
You need a trick to avoid that doxygen sees this "confusing" code.

Just another test you can make for another idea. 

I don't know so much about this [DllImport]. Try whether your 
compiler compiles the following.

Preprocessor trick 1:

#ifndef DOXYGEN
[DllImport("mydll.Dll")]
#endif
/// your documenation block
private static extern ushort myFunction();

If yes, then you have good chances. 
Activate the DOXYGEN (choose any name you want) as a PREDEFINED macro 
in the doxygen config file to avoid parsing this DllImport stuff with 
doxygen.

The disadvantage is that it looks a little odd in the source code.

There is also a similar trick that uses doxygen conditional commands 
instead of preprocessor conditionals. Look in the manual to the how 
those conditional blocks work in doxygen.

Preprocessor trick 1:

Clemens

On 3 Jan 2007 at 9:20, Jeffrey Dufseth wrote:

> Hello,
> I am somewhat new to Doxygen.  I have been reading on the mailing lists and
> manual documentation but cannot find an answer to my problem.
> 
> I have a C# document that basically has a bunch of DLL imports in it, like
> this one:
> 
>         /// <summary>
>         /// This function does blah blah blah.
>         /// </summary>
>         /// <returns></returns>
>         [DllImport("mydll.Dll")]
>         private static extern ushort myFunction();
> 
> On each one of these functions I get a "Warning: member with no name found."
> error.  Has anyone else encountered this?
> Any comments or suggestions are greatly appreciated.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Gmane