Build universal
alper opened this issue · 8 comments
Is the build_universal.sh script to build obj-zmg or zeromq into a fat library? And why does it only have x86 architectures and no arm in it?
Adding the armv6 and armv7 architectures to the script does not work.
Taking the i386 version of the library and trying to link that gives the following error:
Undefined symbols for architecture i386:
"OBJC_CLASS$_ZMQContext", referenced from:
objc-class-ref in ViewControler.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Also ZMQSocket.h does:
#import <zmq.h>
I changed that to "zmq.h" to make it find the included library. Should that be necessary?
- Whether you use brackets or quotes for the inclusion depends on how you set up your build environment and which compiler flags you pass.
- The build universal script has only x86 architectures because that was easier to test than anything involving iOS. See issue #3 for the discussion that led to its creation. That issue was opened about iOS support some time ago, and OP never returned to indicate success or failure or provide a pull request.
- The i386 version worked when I originally wrote it. That was 2 years ago. I would not be surprised to find it no longer works: trying to add multiple architecture/cross compilation support to a build process by manipulating
CFLAGS
is a hack that only sometimes works. It's possible there's another way to do this, but it seems your problem is really with ZeroMQ and its build process, not objc-zmq.
Ok fair enough. I found a guide to building an iOS framework that wasn't linked up on the wiki. Pursuing that strategy right now.
is this work for armv architecture
is this work for armv7 architecture