Pages

Hello ZeroMQ 3.1

ØMQ is currently available in two versions, 2 and 3.

On December 2011, there has been a release for both of them, 2.1.11, stable, and 3.1.0, beta. The 3.0.x development has been discontinued, for a number of reasons that you can read in the OMQ release report on github.

I am not using ZMQ for a production job at the moment, so I can do some experimentation with version 3, even if it is not marked as stable.

As usual, first thing to do is downloading the software and set the development environment up.

It didn't change much, as I have seen following my own installation notes I wrote for the 2.1.x version.

First step is going to the official download page on zeromq.org, and choose the version that suits you better.

I'm still working on Windows with MSVC 2010 so, once I downloaded the compressed package, I expanded it, and I opened the builds/msvc/msvc10.sln solution. And then was just a matter of building it to get a fresh copy of ØMQ lib and dll.

Then I created a new solution, where I ported the first very simple application that just say hello and show the current 0MQ version.

A few settings for the MSVC project:

In the VC++ Directories tab, I added the (...)\zeromq-3.1.0\include directory in the field Include Directories (as one would expected).
In the Linker - General tab, I added (...)\zeromq-3.1.0\lib\Win32 to the Additional Library Directories.
And in the Linker - Input tab, I added among the Additional dependencies the zmq library name (it varies if you are using a normal or debug version).

Remember to put the DLL in a path visible to the application at runtime.

Once all of this is done, we could write the code:
#include <iostream>
#include <zmq.h>

int main()
{
    int major, minor, patch;
    zmq_version(&major, &minor, &patch);
    std::cout << "Hello from ZMQ " << major << '.' << minor << '.' << patch << std::endl;
}
Not a very creative use of ZeroMQ, but if it compiles, and if you get this output:
Hello from ZMQ 3.1.0
You can assume everything works fine.

Go to the full post

A couple of puzzling messages

I am doing some housekeeping in This Thread, that and the end of the job should result being more focused on C++ development.

Large part of the job was about reviewing old post and move them to Biting Code, my new blog where I am storing all the Java related stuff. But finally today I added the first couple of brand new posts, both of them are about error messages I got working with Eclipse.

Expecting a stackmap frame is dedicated to an obscure error that leads to an error message saying "Expecting a stackmap frame at branch target ... in method ...".

JDK is required for JSP is about another perplexing error, that ends up showing the message "Errors exist in required project".

I got both issues working with the Google App Engine plugin. And in both case the solution was simply ensure that the JRE used by the application was actually a JDK.

Go to the full post

Biting Code

I haven't done much in this blog in the past days because I have found out that I was polluting it too much with posts on Java stuff - it happened that I entered in a project where my C++ expertise is not useful, and I have to get focused on Java instead. I wondered if it wasn't the case of split the blog, keeping This Thread mainly for C++ (and something more) and moving all the Java related stuff somewhere else.

Well, I did it. And Biting code is its name.

Go to the full post