compiler errors when certain header files are included
Hello there, I stumbled over a very weird thing just now. I include the following three header files: highgui.h, opencv.hpp, windows.h. When all three are active, I get one C2059 and two C2589, all in objdetect.hpp on line 338. Leaving out one of them, no matter which, all is well. Changing the order of the includes also remedies the situation. Following order does not work:
highgui.h windows.h opencv.hpp
Everything else seems to be fine. Can someone verify/explain this behaviour? Should'nt be headerfiles be immune to such erratic behavior? In this case, there was little harm done, but still I had to revert my work back to one hour earlier because I could not figure out what I had done wrong (nothing, as I know now).
Thanks to anyone looking into this.
EDIT: I am using version 2.4.9 on x86 Windows with Qt Creator.
I do not really know what causes the mentioned error but since highgui.h is an C header file and opencv.hpp is an C++ header file, you could try: highgui\highgui.hpp windows.h opencv.hpp.