xcode4.5でopencv(c++)使ってみる
http://unasuke.com/howto/2013/opencv-camera-test-on-xcode/
こちらの記事を参考にopencv2.4.6をxcodeで実行しようとしたらエラーが出ました。
cv::imshow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, cv::_InputArray const&)", referenced from:
原因はlibc++を使っていたことが原因のようです。
http://stackoverflow.com/questions/12770115/linking-libraries-opencv-2-4-2-on-xcode-4-5-1
こちらにある解決法の通り、Xcodeのbuild settings -> Apple LLVM language c++ -> c++ standard library を libc++からlibstdc++に変更したら解決しました。
さすがstack overflow。素敵。