ウェブカメラでキャプチャしたビデオから顔と目を検出しようとしています。私はubuntu11.10でEclipseとopencv-2.3.1を使用しています。このコードをC/C++で書きたいです。チュートリアルを見て日食を設定しました。コードをオンラインで入手しました。objectDetection.cpp
以下のようなエラーが発生します:
> **** Build of configuration Release for project opencv_try **** make all
> Building file: ../objectDetection2.cpp
> Invoking: GCC C++ Compiler
> g++ -I/home/vidula/OpenCV-2.3.1/include/opencv -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"objectDetection2.d" -MT"objectDetection2.d" -o"objectDetection2.o" "../objectDetection2.cpp"
> Finished building: ../objectDetection2.cpp
> Building target: opencv_try
> Invoking: GCC C++ Linker
> g++ -L/usr/lib -L/home/vidula/OpenCV-2.3.1/lib -L/home/vidula/OpenCV-2.3.1/modules/imgproc/include/opencv2/imgproc -o"opencv_try" ./objectDetection2.o -lopencv_core -lopencv_highgui
> /usr/bin/ld: ./objectDetection2.o: undefined reference to symbol 'cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)'
> /usr/bin/ld: note: 'cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)' is defined in DSO /usr/local/lib/libopencv_imgproc.so.2.3 so try adding it to the linker command line
> /usr/local/lib/libopencv_imgproc.so.2.3: could not read symbols: Invalid operation collect2: ld returned 1 exit status make:
> *** [opencv_try] Error 1
リンカーにリンクしてみましたが、何が間違っているのかわかりません。誰かが私が何が悪いのかを理解するのを手伝ってもらえますか?