'Compilation Error on #include <algorithm> Algorithm:No such file or Directory

I want to use OpenCV and Open SURF libraries in one project along with ARToolKitPluas then it gives me error "Algorithm:No such file or Directory" which i tried my best to fix but can't. Please Help me. Really i am in trouble and need your help.

Thanks



Solution 1:[1]

Your source file is probably being compiled as ObjC or C. It should be C++ (.cpp) or ObjC++ (.mm).

Solution 2:[2]

My Problem Solved by setting the following

  1. #import <opencv/cv.h> in .pch file
  2. Providing path for includes in Header search path
  3. Providing path for libraries in Library search path
  4. Also changing class name to .mm
  5. writing this -lstdc++ -lz in Other linker flags
  6. And most important issue that i observed is that the project folder name should not contain space for example if project folder name is AR Camera then change it to ARCamera otherwise it will give errors

Solution 3:[3]

May be you have not added Application.mk file in your project.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 justin
Solution 2
Solution 3 DjP