Two frequently asked questions about OPENCV development configuration under iOS (sign and link)

Source: Internet
Author: User

First, you can run the official recommended OpenCV for IOS samples demo Link: https://github.com/Itseez/opencv_for_ios_book_samples.git

I. Limitations on the development of real machines:

OpenCV Development under iOS, if it involves the camera, need to use the real machine to run, so you need to add a developer account, if it is free, can run 7 times a week (if the funds are limited to register a few more available accounts) General-add an account.

Second, according to official instructions to do but did not succeed

If you set up a project, according to OPENCV official instructions to configure, basically no problem, the only thing to illustrate: OPENCV provides the framework is C and C + + mixed, so in Xcode writing OpenCV also xcode/c++ mixed compilation, If your project in Xcode has both OC Code and C + + code, in the default configuration, it will be reported as:

"Std::__1::__vector_base_common::__throw_length_error () const", referenced From:cv::sparsemat::resizehashtab ( unsigned long) in Opencv2 (MATRIX.O) std::__1::vector>::__append (unsigned long) in Opencv2 (MATRIX.O) Std::__1: : Vector>::__append (unsigned long) in Opencv2 (MATRIX.O)

Wait a bunch of link errors, there are two workarounds:

1. Change a file in the project with a suffix of. m to. mm. Because. mm files can contain C + + code in addition to objective-c and C code;

2. Set the compiler: Locate the project build Settings and set compile source as object-c++ to run.

  

Two frequently asked questions about OPENCV development configuration under iOS (sign and link)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.