linker error when we use armv7 in zeromq
Closed this issue · 2 comments
I followed this blog http://paolodenti.blog.com/2012/07/24/zeromq-ios and create a framework. The framework is successfully build when I include framework in my project and user armv 7, I get 20 error if I used armv6 it successfully build.
Undefined symbols for architecture armv7:
"_zmq_msg_init_size", referenced from:
-[ZMQSocket sendData:withFlags:] in ZMQSocket.o
"_zmq_recvmsg", referenced from:
-[ZMQSocket receiveDataWithFlags:] in ZMQSocket.o
"_zmq_msg_size", referenced from:
-[ZMQSocket sendData:withFlags:] in ZMQSocket.o
-[ZMQSocket receiveDataWithFlags:] in ZMQSocket.o
"_zmq_msg_close", referenced from:
-[ZMQSocket sendData:withFlags:] in ZMQSocket.o
-[ZMQSocket receiveDataWithFlags:] in ZMQSocket.o
"_zmq_msg_data", referenced from:
-[ZMQSocket sendData:withFlags:] in ZMQSocket.o
-[ZMQSocket receiveDataWithFlags:] in ZMQSocket.o
"_zmq_connect", referenced from:
-[ZMQSocket connectToEndpoint:] in ZMQSocket.o
"_zmq_msg_init", referenced from:
-[ZMQSocket receiveDataWithFlags:] in ZMQSocket.o
"_zmq_errno", referenced from:
-[ZMQContext initWithIOThreads:] in ZMQContext.o
-[ZMQSocket initWithContext:type:] in ZMQSocket.o
-[ZMQSocket close] in ZMQSocket.o
-[ZMQSocket setData:forOption:] in ZMQSocket.o
-[ZMQSocket dataForOption:] in ZMQSocket.o
-[ZMQSocket bindToEndpoint:] in ZMQSocket.o
-[ZMQSocket connectToEndpoint:] in ZMQSocket.o
...
"_zmq_socket", referenced from:
-[ZMQSocket initWithContext:type:] in ZMQSocket.o
"_zmq_sendmsg", referenced from:
-[ZMQSocket sendData:withFlags:] in ZMQSocket.o
"_zmq_setsockopt", referenced from:
-[ZMQSocket setData:forOption:] in ZMQSocket.o
"_zmq_bind", referenced from:
-[ZMQSocket bindToEndpoint:] in ZMQSocket.o
"_zmq_strerror", referenced from:
-[ZMQContext initWithIOThreads:] in ZMQContext.o
-[ZMQSocket initWithContext:type:] in ZMQSocket.o
-[ZMQSocket close] in ZMQSocket.o
-[ZMQSocket setData:forOption:] in ZMQSocket.o
-[ZMQSocket dataForOption:] in ZMQSocket.o
-[ZMQSocket bindToEndpoint:] in ZMQSocket.o
-[ZMQSocket connectToEndpoint:] in ZMQSocket.o
...
"_zmq_close", referenced from:
-[ZMQSocket close] in ZMQSocket.o
"_zmq_term", referenced from:
-[ZMQContext terminate] in ZMQContext.o
"_zmq_init", referenced from:
-[ZMQContext initWithIOThreads:] in ZMQContext.o
"_zmq_poll", referenced from:
+[ZMQContext pollWithItems:count:timeoutAfterUsec:] in ZMQContext.o
"_zmq_getsockopt", referenced from:
-[ZMQSocket dataForOption:] in ZMQSocket.o
"_zmq_version", referenced from:
+[ZMQContext getZMQVersionMajor:minor:patch:] in ZMQContext.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Your framework build isn't including the binary for armv7. Run otool -fv BINARY
replacing BINARY with the path to the framework binary to see what architectures are included. Then fix it to build and lipo in the armv7 version.
I Includes armv7 and armv7s in my framework