Why does marking a listing as exported / imported interrupt Doxygen generation?

Using Doxygen, I came across this warning:

D:/<some/path>/Camera.h:20: warning: documented symbol `enum DLLPORT ct::CameraCapture::ct::CameraCapture::CamType' was not declared or defined. 

Now I know why Doxygen does not find this class (namespaces are explicitly duplicated), which I do not understand, therefore it even looks for it. This listing is in the header file, directly above the class definition, and the class is found perfectly, it also does not get these double namespaces. The source code also compiles, so it's probably not a syntax error causing problems with Doxygen. In particular, the source code is as follows:

 #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... }; } } 

The same problem occurs with other enum blocks. I hope some of you guys know what's going on there.

Greetings

+4
source share
1 answer

You do not need dllexport and dllimport enumerations. These are just type declarations, not code. Just use enum CamType . Classes (either en'masse or by-member) will need it, as well as individual free functions, but simple enumerations are NOT.

+11
source

Source: https://habr.com/ru/post/1500772/


All Articles