Ask Your Question
0

What are the correct XCode 4.5.2 settings for the compiled framework?

asked 2012-12-31 14:45:12 -0500

jbeuckm gravatar image

I am trying to build a Titanium iOS module that uses the current 2.4.3 opencv2.framework. The module builds, but when I try to link with another XCode project, I get the listed errors. I have spent quite a bit of time now trying different compiler and dependency settings but can't get it to build without lots of std:: related errors.

Will the App have to built with the same settings as the module? What are the correct settings to work with that framework? Is there a known problem with cvVideoCamera in the latest framework?

Undefined symbols for architecture armv7:
  "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::assign(char const*)", referenced from:
      cv::BmpDecoder::BmpDecoder() in opencv2(grfmt_bmp.o)
      cv::BmpEncoder::BmpEncoder() in opencv2(grfmt_bmp.o)
      cv::PxMEncoder::PxMEncoder() in opencv2(grfmt_pxm.o)
      cv::TiffEncoder::TiffEncoder() in opencv2(grfmt_tiff.o)
      cv::SunRasterDecoder::SunRasterDecoder() in opencv2(grfmt_sunras.o)
      cv::SunRasterEncoder::SunRasterEncoder() in opencv2(grfmt_sunras.o)
  "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      cv::Exception::Exception(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in opencv2(system.o)
      cv::Exception::Exception(cv::Exception const&) in opencv2(system.o)
      cv::BaseImageEncoder::getDescription() const in opencv2(grfmt_base.o)
  "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()", referenced from:
      cv::Mat::create(int, int const*, int) in opencv2(matrix.o)
      __ZN2cvL7setSizeERNS_3MatEiPKiPKmb in opencv2(matrix.o)
      cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&) in opencv2(matrix.o)
      cv::Mat::Mat(cv::Mat const&, cv::Range const*) in opencv2(matrix.o)
      cv::Mat::diag(int) const in opencv2(matrix.o)
      cv::Mat::Mat(_IplImage const*, bool) in opencv2(matrix.o)
      cv::Mat::reserve(unsigned long) in opencv2(matrix.o)
      ...
  "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(char const*, unsigned long)", referenced from:
      cv::Mat::create(int, int const*, int) in opencv2(matrix.o)
      __ZN2cvL7setSizeERNS_3MatEiPKiPKmb in opencv2(matrix.o)
      cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&) in opencv2(matrix.o)
      cv::Mat::Mat(cv::Mat const&, cv::Range const*) in opencv2(matrix.o)
      cv::Mat::diag(int) const in opencv2(matrix.o)
      cv::Mat::Mat(_IplImage const*, bool) in opencv2(matrix.o)
      cv::Mat::reserve(unsigned long) in opencv2(matrix.o)
      ...
  "std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:
      std::__1::vector<cv::Vec<int, 128>, std::__1::allocator<cv::Vec<int, 128> > >::__append(unsigned long) in opencv2(matrix.o)
      std::__1::vector<cv::Vec<int, 64>, std::__1::allocator<cv::Vec<int, 64> > >::__append(unsigned long) in opencv2(matrix.o)
      std::__1::vector<cv::Vec<int, 32>, std::__1::allocator<cv::Vec<int, 32 ...
(more)
edit retag flag offensive close merge delete

Comments

Update: I have a project running at the moment with Apple LLVM 4.1 / C++ Language Dialect = compiler default / C++ Standard Library = libc++ (LLVM std lib with C++11 supp). Sources that use OpenCV need to have suffic .mm so they are compiled as Objective-C++ and references to opencv classes need to be namespaced by either using cv::[class] or declaring "using namespace cv;"

jbeuckm gravatar imagejbeuckm ( 2013-01-03 21:48:39 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-04-25 01:36:16 -0500

iOSDev gravatar image
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2012-12-31 14:45:12 -0500

Seen: 2,043 times

Last updated: Apr 25 '13