Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Xcode 7 does not build project with opencv 3.0.0 framework

I can't build project with a new version of the opencv 3.0.0 framework (version 2 did not have this problem). Xcode 7 does not compile c++ sources as c++.

Here's the simplest setup that is not building:

  1. Download the 3.0.0 framework from here http://netix.dl.sourceforge.net/project/opencvlibrary/opencv-ios/3.0.0/opencv2.framework.zip
  2. Create the simplest ios project with Swift language.
  3. Drag-and-drop the framework to the project.
  4. Create the Objective-C++ source and headers and add them to the project.
  5. Create the bridging header.

Here's the setup:

image description image description

  1. Build.

And here's what the compiler says:

image description

Why is that? I've got the .mm file and it is supposed to compile as the Objective-C++ source.

Xcode 7 does not build project with opencv 3.0.0 framework

I can't build project with a new version of the opencv 3.0.0 framework (version 2 did not have this problem). Xcode 7 does not compile c++ sources as c++.

Here's the simplest setup that is not building:

  1. Download the 3.0.0 framework from here http://netix.dl.sourceforge.net/project/opencvlibrary/opencv-ios/3.0.0/opencv2.framework.zip
  2. Create the simplest ios project with Swift language.
  3. Drag-and-drop the framework to the project.
  4. Create the Objective-C++ source and headers and add them to the project.
  5. Create the bridging header.

Here's the setup:

image description image description

  1. Build.

And here's what the compiler says:

opencv2.framework/Headers/core/base.hpp:49:4: error: base.hpp header must be compiled as C++

image description

Why is that? I've got the .mm file and it is supposed to compile as the Objective-C++ source.