6

I have developed an xCode static library for an iPhone App using OpenCV. Now I want to give my static library to them but I don't want them to go through the hassle of making OpenCV work in their project by changing build settings and all that, that's what I already had to do myself in the static library.

I usually use the 'Projectception' method by dragging my static-library-project into my main xCode project. However when I use this method I usually need to add all the frameworks I use in the static library project again in my main project in the 'Link Binary with Libraries' build phase.

So my question is: is there a way that the OpenCV is only in my static library project and that a new project that imports this static library does not have to do anything extra for OpenCV to work?

1 Answer 1

2
+50

Yes. Clone(copy) opencv inside your project (headers and implementation)*, desclare the copied files inside your project and don't use any c/c++ include folder and any library linkage.

*implementations are in modules/.../src/

Sign up to request clarification or add additional context in comments.

7 Comments

can you confirm this works with the newest version of OpenCV for iOS? With the newest version you simply drag the openCV as a framework in your project and also add some resources. Should I still do this or do I need to copy other files instead?
could you answer my comment please?
If I wanted to get rid of OpenCV includes and binaries, I'd implement all of it inside my library project. I am not aware of any easier way.
do you mean you specifically implement all the header files of OpenCV instead of a static lib/framework?
ok perfect, I understand now, it might be some work to do that but in the end the client will not have to perform 10 extra steps in the build settings of their project to make it work. Thanks for your help!
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.