Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not a Doxygen trailing comment

Tags:

xcode

opencv

I am creating a project using Xcode using OpenCV library. I get an compiling error saying

Not a Doxygen trailing comment

in core.hpp and lots of other sources contained in the opencv framework. (Editor: I got my opencv framework from somewhere in the internet and needed to bind it to my project).

enter image description here

How do I save myself?

like image 714
sophchoe Avatar asked Oct 08 '16 05:10

sophchoe


3 Answers

This solved it for me, suppressing the warnings only in the third party library headers. Just wrap the problematic header #includes with these pragmas:

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdocumentation"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#pragma clang diagnostic pop

You can substitute or add other warning flags to be ignored. This is a combination of a hint from Konchog and Vladimir Grigorov’s super helpful answer here.

like image 160
Craig Reynolds Avatar answered Oct 22 '22 12:10

Craig Reynolds


You can go to Build Settings and search for Documentation Comments and set as No. Doxygen is just a format, you can skip that for code you are not the owner.

like image 25
David Bemerguy Avatar answered Oct 22 '22 10:10

David Bemerguy


As a temp solution:

  1. Get rid of most of the warnings by clicking the yellow triangle and pressing return which will make some auto-correction.

enter image description here

  1. For the single one with an exclamation mark in the triangle delete some of the comment. enter image description here

This will basically just change some of the comments in the opencv sources. Since mine is a local copy and not git clone that's fine. I guess that basically the opencv guys need to get that fixed. However, it would be nice to know some compiler option in Swift to turn those warnings off.

like image 4
qwerty_so Avatar answered Oct 22 '22 11:10

qwerty_so