Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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 ?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

SOURCES += \
        main.cpp

RESOURCES += qml.qrc

HEADERS +=  \
    Headers/zmq.h \
    Headers/zmq.hpp \
    Headers/zmq_utils.h

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading