Question

I know this question looks like a duplicate and the answer may already be out there but I haven't been able to find it. I'm getting the hang of the problem by looking at other answers but my situation is a little different and it's causing me some confusion.

Let me try to explain.

I have a .framework project that I have created. Here are my Link Binary With Libraries:

My Link Binary With Libraries

Here are my architecture settings:

enter image description here

This is the error:

Undefined symbols for architecture armv7: "_OBJC_CLASS_$_QlmLicense", referenced from: objc-class-ref in id2(MainViewController.o)

You can tell by the error that my MainViewController in id2.framework is referencing the QlmLicense class (which is in a QlmLicenseMobile.framework). So, here are the Target files for QlmLicenseMobile.framework (with details listed below):

enter image description here

The source and header files are all there and there are no libraries in the Link Binary With Libraries section. The Copy Bundle Resources contains only the infoPlist.strings and the Copy Files contains only the QlmLicenseMobile.framework.

Here are the architectures for QlmLicenseMobile.framework:

enter image description here

Finally, the build error occurs in my demo application. Here are the Link Binary With Libraries files:

enter image description here

And here are the architectures:

enter image description here

  1. My .framework and demo projects were playing well together.

  2. Now I'm using the QlmLicenseMobile.framework from within my .framework project. These two build fine together.

  3. It's my demo project that gives me the error.

So, to be clear, my references are as such:

demo app -----> my.framework app -----> QlmLicenseMobile.framework app

Anyway, yeah, this is a little more complicated than your usual library settings. I don't know what else I need to do/add to the demo project to get it to build. Any ideas?

Adding new information to help someone else with this problem.

Part of the problem was solved by Warren Burton in his answer.

The second problem was that I needed to add to my demo app a library that was being used by the third party QlmLicenseMobile.framework, even though that framework was contained in my.framework. Since everything was contained in my.framework I didn't know I still needed to add their framework AND the libxml2.2.dylib to my demo app. I tried to add their framework but that didn't work. Then I got the bright idea to try adding the libxml2.2.dylib and voila! That was the magic missing piece of the puzzle. So, it turned out to look more like this:

demo app -----> my.framework app -----> QlmLicenseMobile.framework

demo app -----> my.framework app -----> libxml2.2.dylib

demo app -----> QlmLicenseMobile.framework

demo app -----> libxml2.2.dylib

Here is an updated image of the Link Binary With Libraries files for my demo app:

enter image description here

Was it helpful?

Solution

Check that your FRAMEWORK_SEARCH_PATHS are setup for that Configuration and Target

Its given me grief at linking time before.

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top