Multiple undefined reference errors in hpp file

I am getting multiple undefined reference errors from zmq.hpp such as:

`build-client-Desktop_Qt_5_15_2_GCC_64bit-Debug/../client/Headers/zmq.hpp:113: undefined reference to zmq_errno'

and the others are zmq_strerror, zmq_msg_init etc. there are like 20 of them.

I guess the hpp file can not find the zmq.h ?

I added the headers also in .pro file in QT like:


RESOURCES += qml.qrc

    Headers/zmq.h \
    Headers/zmq.hpp \

How am I going to link them?

Screenshot from 2021-11-17 08-41-15

  • OS: Ubuntu 18.04

>Solution :

This is a linker error, you forgot to add library to your .pro file. The line looks like this LIBS +=lib_path/lib_name

Leave a Reply