Fan
Fan

Reputation: 1163

When creating a universal application, how to link to a framework with separated 32bit and 64bit version?

My situation:

My problem:

Xcode cannot find symbols from the framework when building a x86_64 version. Looks like Xcode only search symbols in the i386 version of framework, by command line arguments "-framework $FRAMEWORK_NAME".

My question:

How could I make Xcode also search symbols from the x86_64 framework? Or is it possible to link to a non-universal library when building a universal application?

My progress:

I guess that creating a universal version of this framework by lipo maybe solves this problem, but if possible, I would like to avoid this. Because it involves some external changes.

Thanks

Upvotes: 2

Views: 308

Answers (3)

Nicholas Riley
Nicholas Riley

Reputation: 44311

You can create two versions of your app and lipo them together, but it's probably easiest if you just lipo the framework itself. There's no reason you need to affect the external library's build process; you can just do it in place as part of the build process for your own app.

Upvotes: 1

Stephen Canon
Stephen Canon

Reputation: 106117

Getting the framework to build fat (or lipoing together the two slices) is by far the most elegant solution. Is there a reason to not do that?

Upvotes: 0

Ken Aspeslagh
Ken Aspeslagh

Reputation: 11594

Alternatively, you could link two separate versions of your app, and the join those with lipo.

Upvotes: 0

Related Questions