nzmqt icon indicating copy to clipboard operation
nzmqt copied to clipboard

undefined reference to 'vtable for nzmqt::ZMQContext` on ubuntu

Open grexdevops opened this issue 5 years ago • 1 comments

I'm following the examples to create a console application that uses the pub-sub pattern using Qt on ubunutu. I'm using the include method of working with the code. When I try to compile my application I get several errors like:

undefined reference to 'vtable for nzmqt::ZMQContext' undefined reference to 'vtable for nzmqt:;PollingZMQContext'

I opened all of the project files provided in the code and they all compile and run properly. Yet, when I try to include the <nzmqt/nzmqt.hpp> file, I get the error messages.

I'm using version 3.2.1 of nzmqt and 5.12.1 of Qt.

(Note: This relates to a post in the Qt forum: https://forum.qt.io/topic/100688/error-using-include-method-with-nzmqt-undefined-reference-to-vtable-for-nzmqt-zmqcontext )

grexdevops avatar Mar 13 '19 15:03 grexdevops

I switched to the static library method and that seems to be working.

grexdevops avatar Mar 13 '19 18:03 grexdevops