micro_ros_setup icon indicating copy to clipboard operation
micro_ros_setup copied to clipboard

Problems with include path of libraries in microros

Open N-K1998 opened this issue 1 year ago • 4 comments

Issue template

  • Hardware description: STM
  • RTOS: freeRTOS
  • Installation type: microros_setup
  • Version or commit hash: iron

Steps to reproduce the issue

I have compiled Microros as a static lib and added it using the compile flags. I have also added the folder libmicroros/include as an include path. However, the code does not find any of the headers because the folders are organized in the following way: library_name/library_name/header_file.h. That's because the includes are /library_name/headear_file.h. In other words, I am forced to add each folder path as an include path. Is there a way to make it simpler? In the previous version of Microros, the folder organization was /library_name/headear_file.h, and the new version's code still follows that standard.

N-K1998 avatar Sep 18 '23 10:09 N-K1998

In other packages, we have script lines that move the folder to the logical location:

https://github.com/micro-ROS/micro_ros_stm32cubemx_utils/blob/3819f6819cee1ff01c3da58ecbc8bfcbf4b0a2a5/microros_static_library/library_generation/library_generation.sh#L77-L87

Please take a look.

It would be great if you could contribute back to this repo the solution.

pablogs9 avatar Sep 18 '23 10:09 pablogs9

Basically, is it sufficient to take the folders and put them back into the main include one?

N-K1998 avatar Sep 18 '23 11:09 N-K1998

That should be enought

pablogs9 avatar Sep 18 '23 12:09 pablogs9

Ok, I try and then I report.

N-K1998 avatar Sep 18 '23 12:09 N-K1998