6

I'm trying to compile the Objective-C bindings (https://github.com/jeremy-w/objc-zmq) for zeroMQ for use on the iPhone.

I've added the "objc-zmq" project as a dependency to the project I want to include it in. Everything compiles, however, none of the symbols can be found as it's not linked to the libzmq.a binary.

How do I compile libzmq.a for use with the iPhone. Also, once I have that, how do I have my project link to it?

I tried some of the suggestions from this post: Compile C lib for iPhone

However, these were rather fruitless for me. Any help would be greatly appreciated.

Community
  • 1
  • 1
manlycode
  • 421
  • 6
  • 16

1 Answers1

2

The library in the wrapper is built only for i386 architecture (i.e. iPhone Simulator). I have written an article on how to compile the library for ARM architecture as well as link it into your iOS project (which THEN will work with objc-zmq wrapper).

Eimantas
  • 48,927
  • 17
  • 132
  • 168
  • 1
    Elimantas' script worked for me, however I had to change the SDK_ROOT to match Xcode's new location, as well as bring it up to `iPhoneOS5.1.sdk` (not 5.0): `SDK_ROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer"` – Adam Preble Apr 18 '12 at 23:21
  • Thanks you both very much. It now says arm. :) I wish I have a little idea of how it works though. Does the symbol you exported override those in Makefile? – huggie Apr 22 '12 at 01:38
  • I just realized that the original poster is asking for objc-zmq project while your code works for the original zeromq project. – huggie Apr 22 '12 at 02:32
  • link no longer works – Dinesh Feb 10 '23 at 21:11