Ask Your Question
1

Framework Not Found — OpenCV

asked 2014-05-25 21:09:50 -0600

chflags gravatar image

updated 2014-05-26 00:44:40 -0600

berak gravatar image

I am having issues getting OpenCV to work with iOS and Xcode. I am running OS X 10.9.3 and Xcode 5.1.1. To install OpenCV and build the framework for iOS, I followed these instructions exactly.

I then created a new project, and dragged in opencv2.framework from Finder into Link Binary with Libraries. After building the project, I get:

ld: framework not found opencv2
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I noticed that in the right sidebar there is a question mark next to opencv2.framework I read that this is due to the framework not being included in source control. I selected the framework and clicked Source Control > Add "opencv2.framework" The question mark doesn't go away and the build still fails with the same error.

Usually when Xcode cannot find a file, the file's text is red. It is not in this case.

Could someone please help me?

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2014-05-26 14:48:13 -0600

coinocr gravatar image

try this

on the left navigation bar, select the top level project file so that you see the "Build Phases" on the right panel. There select the "Link Binary with Libraries." If opencv2.framework is not there, add it. If it is there, remove it and add it again.

This has worked for me with weird framework issues.

edit flag offensive delete link more

Comments

Did not work for me. It started working when I moved the 'opencv2.framework' file into the project folder (previously I had the file in a general folder with other libraries outside the project). Then, including it as usual worked correctly.

goe gravatar imagegoe ( 2015-12-15 04:55:15 -0600 )edit
0

answered 2016-11-24 05:17:24 -0600

era gravatar image

updated 2016-11-24 05:17:45 -0600

If the framework is outside your project folder you'll have to add

$(PROJECT_DIR)/../path/to/framework/folder

to the Framework Search Paths build setting.

edit flag offensive delete link more

Comments

Why is this necessary? Other frameworks don't need this.

ChristopherO gravatar imageChristopherO ( 2017-06-25 05:49:10 -0600 )edit

Question Tools

Stats

Asked: 2014-05-25 21:09:50 -0600

Seen: 7,112 times

Last updated: Nov 24 '16