Reputation: 485
I'm trying to add the opencv2-2 (the latest release) framework to my iOS project, but I am encountering this error when I build.
ld: framework not found opencv2-2
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The opencv2-2 framework appears in the Link Binary with Libraries section of the Build Phases tab. If it's relevant, this is my import statement in ViewController.m:
#ifdef __cplusplus
#import <opencv2-2/core.hpp>
#endif
What am I doing wrong?
Upvotes: 1
Views: 755
Reputation: 1
I had the same error, I changed the framework name from opencv2-2.framework in opencv2.framework and it works
Upvotes: 0
Reputation: 56
Your framework file should be named opencv2.framework
and your import statement should be #import <opencv2/core.hpp>
.
I'm not sure where you got the incorrect name opencv2-2
. Maybe you downloaded opencv2.framework
twice and Mac automatically renamed the second copy to opencv2-2.framework
.
Upvotes: 2