我使用Doxygen时遇到了以下警告:
D:/<some/path>/Camera.h:20: warning: documented symbol `enum DLLPORT
ct::CameraCapture::ct::CameraCapture::CamType' was not declared or defined.
现在我知道为什么Doxygen找不到那个类(命名空间显然是重复的),但我不理解为什么它甚至要搜索它。这个枚举在头文件中,直接在一个类定义的上面,而且该类也被成功找到,也不会生成双重命名空间。 源代码也编译通过了,所以可能不是语法错误导致Doxygen出现这些问题。 具体来说,源代码如下:
#ifdef CT_EXPORTS
#define DLLPORT __declspec(dllexport)
#else
#define DLLPORT __declspec(dllimport)
#endif
#include <somelibrary>
namespace ct {
namespace CameraCapture {
/**The type of camera used:
*[...]
**/
enum DLLPORT CamType {
CT_ENUM1=0,
CT_ENUM2,
CT_ENUM3,
CT_NONE
};
/**\brief A parent-class to cameras of all types.
*[...]
**/
class DLLPORT Camera
{
//...some content...
};
}
}
同样的问题也会出现在其他枚举块中。 希望有些人知道发生了什么。 干杯。
enum CamType
即可。 - WhozCraig