FW: [Doxygen-users] including headerfiles inside extern "C"
Brought to you by:
dimitri
From: Catenacci, O. <Ono...@co...> - 2002-01-04 11:41:14
|
Is there anything preventing you from moving the extern "C" declaration to the file.h file? Something like this: file.h: /// MEDEF doc extern "C" { #define MYDEF 1 //etc. } //end extern "C" declaration fileA.cpp #include "file.h" //automatically picks up extern "C" because it's in the header file. In fact I'm more accustomed to seeing the extern "C" in the header file as opposed to being in the files that include the header. Of course that doesn't mean that is more correct--it's just what I'm accustomed to seeing. -- Onorio Catenacci -----Original Message----- From: Tommy Sanddal Poulsen [mailto:TS...@ma...] Sent: Friday, January 04, 2002 4:42 AM To: 'dox...@li...' Subject: [Doxygen-users] including headerfiles inside extern "C" Hi, I'm currently working on a project implemented in C++ and having C interface functions declared in separate h-files. The header files are included inside extern "C" blocks, and this results in multiple define documentation blocks in the doxygen documentation for the h-file. The three files file.h, fileA.cpp and fileB.cpp documented using a standard doxygen config file (although EXTRACT_ALL=YES) yields the peculiar result of three blocks documenting the define of the headerfile - I expected only one, as is the result when the #include's are not embedded inside an extern "C" block. Does anyone have an idea of what to do ? file.h: /// MEDEF doc #define MYDEF 1 fileA.cpp extern "C" { #include "file.h" } void fA() {} fileB.cpp extern "C" { #include "file.h" } void fB() {} - thanks >Tommy Poulsen |