I am trying to follow the manual at this link: http://hintjens.com/blog:49 install ZeroMQ and run a simple example as follows:
#include <czmq.h>
int main (void) {
zctx_t *ctx = zctx_new ();
void *publisher = zsocket_new (ctx, ZMQ_PUB);
zsocket_set_curve_server (publisher, true);
puts ("Hello, Curve!");
zctx_destroy (&ctx);
return 0;
}
However, I received this error message:
hello.c: In function ‘main’:
hello.c:4:5: error: unknown type name ‘zctx_t’
zctx_t *ctx = zctx_new ();
^
hello.c:4:19: warning: initialization makes pointer from integer without a cast [enabled by default]
zctx_t *ctx = zctx_new ();
^
hello.c:5:23: warning: initialization makes pointer from integer without a cast [enabled by default]
void *publisher = zsocket_new (ctx, ZMQ_PUB);
^
Could you help me? I am using Ubuntu 14, and ZeroMQ was successfully installed with these commands:
git clone git://github.com/jedisct1/libsodium.git
cd libsodium
./autogen.sh
./configure && make check
sudo make install
sudo ldconfig
cd ..
git clone git://github.com/zeromq/libzmq.git
cd libzmq
./autogen.sh
./configure && make check
sudo make install
sudo ldconfig
cd ..
git clone git://github.com/zeromq/czmq.git
cd czmq
./autogen.sh
./configure && make check
sudo make install
sudo ldconfig
cd ..
source
share