This is the implementation of Paolo Denti's and Justin DeWind's ZeroMQ Universal Framework for iOS devices.
- http://paolodenti.blog.com/2012/07/24/zeromq-ios/
- http://spin.atomicobject.com/2011/12/13/building-a-universal-framework-for-ios/
I haven't done anything all that exciting; I followed directions and solved a discrepancy.
All kudos go to the above authors.
Compiled with: Xcode 5.1.1, for iOS 7.1 and ...
... submod:zeromq4-x
release:v4.0.4
... submod:czmq
release:v2.2.0
Usage of the Framework is Paolo's Step 5, but I do have an errata!
- just create a normal ios project
- drag the
ZeroMQ-iOS.framework
folder in theFrameworks
group (check the copy checkbox) - click on the project, build settings, add
-lstdc++
to “Other Linker Flags” (the C++ standard library is needed by zeromq) - add the framework headers (just add
$(SRCROOT)/ZeroMQ-iOS.framework/Headers
) to the “Header Search Path” compiler directive - just use normally zeromq in your application (the only note about is that you should
#include "zmq.h"
instead of#include <zmq.h>
)
Errata: The “C++ Standard Library” setting in the Xcode project determines the “Other Linker Flags” that you must include. If libc++ (LLVM C++ standard library with C++11 support
is specified, then the flag must be -lc++
instead of -lstdc++
.
From Justin's blog:
Because I don't save xcuserdata
in git, Justin's step: “Configure aggregate target build against the ‘Release’ configuration” must be done for the user compiling the project.
Right-click on the lib Product and “Show in Finder”. Go up one directory and find the result in: Release-iphoneuniversal
.
Files that need to be public in the framework should be added in the: Build Phase for the target Aggregate: ZeroMQ-iOS: Copy Files. Justin also warns (which I encountered), “Ensure that the header files are copied into place [at compile time] (XCode is known to mess this up on occasion)”.
Note: czmq_prelude.h: #include <crt_externs.h> // commented out, because removed from SDK by Apple
- First run
./autogen.sh
to create./configure
. Then run./configure
- First run
./autogen.sh
to create./configure
. Then runPKG_CONFIG_PATH=../zeromq4-x/src ./configure
- Fixed to build for iOS
- update to OCUnit