Version Reporting

ØMQ does come in several versions, and quite often if you hit a problem, it’ll be something that’s been fixed in a later version. So it’s a useful trick to know exactly what version of ØMQ you’re actually linking with. Example 1-5 is a tiny program that lets you do just that.

Example 1-5. ØMQ version reporting (version.c)

//
//  Report 0MQ version
//
#include "zhelpers.h"

int main (void)
{
    int major, minor, patch;
    zmq_version (&major, &minor, &patch);
    printf ("Current 0MQ version is %d.%d.%d\n", major, minor, patch);

    return EXIT_SUCCESS;
}

Get ZeroMQ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.