I've been experimenting with putting rarely used code into iOS frameworks, and well, I've had a few problems.

The first is an old one that bit me years ago - if you have a Build Configuration in your app, but not in your framework, app files looking for the framework headers won't find them. Anyway, fount a link on StackOverflow that provided a great workaround.

But now I'm totally mystified why I cannot get my app to link in Release - it works just fine with Debug.

The release error is:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_SBSoundEffects", referenced from:
@objc AVSoundTrackSwitch.ViewController.se.getter : __ObjC.SBSoundEffects in ViewController.o AVSoundTrackSwitch.ViewController.se.getter : __ObjC.SBSoundEffects in ViewController.o
      l_get_field_types_ViewController in ViewController.o
ld: symbol(s) not found for architecture arm64

and I get the link same error for arm7.

I used terminal and ran "file SoundEffects" (in the Release folder), and see an arm7 and arm64 library:

$ file SoundEffects
SoundEffects: Mach-O universal binary with 2 architectures
SoundEffects (for architecture armv7): Mach-O dynamically linked shared library arm SoundEffects (for architecture arm64): Mach-O 64-bit dynamically linked shared library

Not only that, but I can see the proper symbols:

00007ca0 s  stub helpers
00007c72 t +[SBSoundEffects load]
00007c5e t -[SBSoundEffects .cxx_destruct] (some C++ code in this project)
00007c14 t -[SBSoundEffects doIt]
00007a60 t -[SBSoundEffects init]

I uploaded the two links - the bad one :
  https://www.dropbox.com/s/h8ug87jq4qqtx7i/BadLink.txt?dl=0

and the good one:
  https://www.dropbox.com/s/ol5xv3d2ua1iiyk/GoodLink.txt?dl=0

in case anyone wants to dig deeper.

At this point I am totally stone walled. Any pointers or suggestions on actions I might take would be most appreciated!

David

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (Xcode-users@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to