Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

Adding a library when compiling a demo

Siméon
New Contributor I
1,001 Views

Hello,  

I compiled the human_pose_estimation demo on my RPi thanks to that post I did:
https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Human-pose-estimation-model-on-Raspberry-pi-4-with-NCS2/m-p/1208710#M20632

But now I want to modify the demo quite a bite to add a library in order to send data. Normally to compile a project that use that lib, I should do it that way:

g++ main.cpp -o test -lzmq

With the -lzmq parameter. I don't know where to add it. I tried to add it inside the CMakeLists.txt of the project in the DEPENDENCIES line, without sucess. Then I added the parameter to cmake command, no more sucess. I'm not familiar with compiling in command line on Linux. That's why I ask your help.

 

Thanks in advance,  
Siméon

 

0 Kudos
1 Solution
OKI__HIdetaka
New Contributor I
932 Views

Hi, just FYI about cmake;

Adding "target_link_libraries(${IE_SAMPLE_NAME} PRIVATE zmq)" line to CMakeLists.txt will work to add a library as a linker option.
You can find added -lzmq option in <build_dir>/<sample_program>/CMakeFiles/<sample_program>.dir/link.txt generated by cmake.

Best Regards,

View solution in original post

6 Replies
Iffa_Intel
Moderator
979 Views

Greetings,


Instead of importing library in that manners, why not use data logger instead.

Here is the example of it: https://www.linuxtopia.org/online_books/programming_books/c++_practical_programming/c++_practical_programming_098.html


(In case) python: https://www.instructables.com/id/Experiments-in-Advanced-Data-Logging-Using-Python-/


Sincerely,

Iffa





0 Kudos
Siméon
New Contributor I
974 Views

The problem, I need the data in real time. That's why I use that library. It's used by another program (NEP: https://enriquecoronadozu.github.io/NEP/) to send the data to others script of my project.
I need to use it. Usually I use NEP in Python.

Regards,
Siméon

0 Kudos
Iffa_Intel
Moderator
944 Views

The data logger can be used for Real Time data collection, you can even do some tweaking to send it through MQTT protocol(just a suggestion) and direct send it to database.


Most RTOS(embedded system) specific in achieving real time application have this kind of implementation also.


Sincerely,

Iffa


0 Kudos
OKI__HIdetaka
New Contributor I
933 Views

Hi, just FYI about cmake;

Adding "target_link_libraries(${IE_SAMPLE_NAME} PRIVATE zmq)" line to CMakeLists.txt will work to add a library as a linker option.
You can find added -lzmq option in <build_dir>/<sample_program>/CMakeFiles/<sample_program>.dir/link.txt generated by cmake.

Best Regards,

Siméon
New Contributor I
894 Views

Thanks for your answer ! It works perfectly !

Sorry for the late reply, I was busy by my apartment move.

 

Best regards,
Siméon

0 Kudos
Iffa_Intel
Moderator
917 Views

Greetings,


Intel will no longer monitor this thread since we have provided a solution. If you need any additional information from Intel, please submit a new question. 


Sincerely,

Iffa


0 Kudos
Reply