In Opencvcore algorithm header file not found while compiling

Hi!
Trying to compile the opencv facedetect.cpp sample file in BeagleBoard
Rev. C5. Have installed the required libc6 and cpp compilers via
offline opkg. We always get the error:

"In file included from /usr/include/opencv2/objdetect/objdetect.hpp:
46:0, from find_obj.cpp:7:/usr/include/opencv2/core/core.hpp:56:21:
Fatal error: algorithm: No such file or directory.
Compilation terminated."

Could somebody help us out with this.

Thanks