I had the same problem yesterday. He searched all the forums, but no one could answer me. Finally, I realized that I am making an inclusion for the entire project and including the files for the project does not match how , including the files for the source of the source file. cpp " (for eclipse, because for VisualStudio it's the same).

So, try right-clicking in the .cpp file and include directories in it. In any case, if you tell me which version of OpenCV you are using, I can tell you more about how to include files in case you have problems.
Hope this helps. When you get errors about missing headers, they are always related to inclusion. At least it happened in my case.
source share