Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
98 Views

Adding a library when compiling a demo

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-Raspber...

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
5 Replies
Highlighted
Moderator
76 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_pr...


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


Sincerely,

Iffa





0 Kudos
Highlighted
Novice
71 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
Highlighted
Moderator
41 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
Highlighted
29 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,

Highlighted
Moderator
14 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