Intentando compilar el ejemplo hello_world.c del tutorial de zeromq: http://zguide.zeromq.org/page:all#Ask-and-Ye-Shall-Receive Estoy bastante seguro de que tengo todo instalado en OSX Mountain Lion.Compilar simple hello world Ejemplo ZeroMQ C, compilar indicadores?
clang -Wall hwserver.c -o hwserver
me da un error:
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)
que no soy el más experimentado en C. No estoy seguro si estoy seguro que a añadir una bandera compilador para el dylib ZMQ o encabezados o de ser mi $ PATH apagado.
en// local/lib usr:
libzmq.3.dylib
libzmq.a
libzmq.dylib
libzmq.la
y en/usr/local/include:
zmq.h
zmq_utils.h
y echo $ PATH:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/lib/:/usr/local/include/
Podría agregar que los argumentos del enlazador deben ubicarse después del 'hwserver.c -o hwserver'. – nnnmmm