Ask Your Question
0

Xcode 7 does not build project with opencv 3.0.0 framework

asked 2015-09-23 04:21:02 -0600

Grigory Ptashko gravatar image

updated 2015-09-23 04:23:23 -0600

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/proje...
  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.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-09-23 05:40:33 -0600

mshabunin gravatar image

Your bridging header has .h extension, either change extension to .hpp, either manually change file type to C++ (in file inspector)

edit flag offensive delete link more

Comments

No. This does not help. OpenCV 2.4.10 for ios works fine in the exactly same setup.

Grigory Ptashko gravatar imageGrigory Ptashko ( 2015-09-23 05:47:09 -0600 )edit

I have the same issue while integrating OPENCV 3.0 to my xcode project. Please someone advice me for the same. VERY URGENT.

pavees gravatar imagepavees ( 2015-12-20 08:23:06 -0600 )edit

The same problem and this doesn't help

eve gravatar imageeve ( 2016-03-19 11:02:55 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-09-23 04:21:02 -0600

Seen: 2,225 times

Last updated: Sep 23 '15