尝试从zeromq教程编译示例hello_world.c:
http://zguide.zeromq.org/page:all#Ask-and-Ye-Shall-Receive
相当肯定我有一切安装在OSX山狮.
http://zguide.zeromq.org/page:all#Ask-and-Ye-Shall-Receive
相当肯定我有一切安装在OSX山狮.
clang -Wall hwserver.c -o hwserver
给我一个错误:
Undefined symbols for architecture x86_64: "_zmq_bind",referenced from: _main in hwserver-OgrEe6.o "_zmq_ctx_new",referenced from: _main in hwserver-OgrEe6.o "_zmq_msg_close",referenced from: _main in hwserver-OgrEe6.o "_zmq_msg_data",referenced from: _main in hwserver-OgrEe6.o "_zmq_msg_init",referenced from: _main in hwserver-OgrEe6.o "_zmq_msg_init_size",referenced from: _main in hwserver-OgrEe6.o "_zmq_msg_recv",referenced from: _main in hwserver-OgrEe6.o "_zmq_msg_send",referenced from: _main in hwserver-OgrEe6.o "_zmq_socket",referenced from: _main in hwserver-OgrEe6.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command Failed with exit code 1 (use -v to see invocation)
我不是最有经验的C.不知道如果我确定添加一个编译器标志为zmq dylib或头或我的$PATH关闭.
在/usr/local / lib中:
libzmq.3.dylib libzmq.a libzmq.dylib libzmq.la
并在/usr/local / include:
zmq.h zmq_utils.h
和echo $PATH:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/lib/:/usr/local/include/