I am currently working on developing a test program for ROS using melodic on Ubuntu 18.04, and I am still a beginner, but I am searching for Google.I'm trying to work with the GUI app in shared memory by obtaining (C++) a program that I can refer to from others and adding a shm_open() function to it.However, the following error appears in catkin_make.I assume that the target_link_libraries failed because I have included it.
Could you teach me how to link this shm_open()?
If you want to compile the original source code, you can compile it with "g++-o myshm mushm.cpp-lrt" and I don't know how to write this compilation option "-lrt" = RealtimeExtensions library in ROS CMakeLists.txt.I apologize for the inconvenience, but please let me know.
# Oira is an amateur
cmake so I'm sorry if I'm wrong
According to https://stackoverflow.com/questions/31147129/,
shm_open() should be in
You can add
rt to the end of
target_link_libraries as shown in .
Huh? So, isn't
add_library more handsome?(Not Tested)
Thank you very much for teaching me.
It was solved by adding rt.
© 2022 OneMinuteCode. All rights reserved.