g++ undefined reference to ZMQ
c++, g++, zeromq
Solution
When you link you have to add -lzmq so the linker will pull in functions from libzmq.
Here's how I compile a hello world program:
gcc -o hello hello.c -lzmq
Problem
I developed my project on my workplace pc (where all is going well), but when I try to compile on my home pc (both ubuntu 12.04) I get the following message: ``` undefined reference to `zmq_sendmsg' ``` I can't understand what am I missing, since I see this ``` /usr/local/lib/libzmq.so /usr/local/lib/libzmq.so.3 /usr/local/lib/libzmq.so.3.0.0 ``` so my ZeroMQ installation seems to be ok. Can someone suggest what could I check?