For a project at university, I need to work with OpenCV. In order to do that I am learning c++ (also because I wanted to anyway). Having learned C last term, we were provided with a set of flags to increase the strictness and verbosity of the compiler. Having done some searching on what flags we can use with g++ in order to make the compiler as strict as possible, I came across this question. What I have found though is that in order to get even an empty main()
to compile with the OpenCV headers without warnings I need to switch off a number of the flags including -Wall
and -Wextra
which were actually required on my course for C programs.
Is there any way of using the OpenCV headers but only applying the warning headers to the code that I write?