micro-ROS / micro_ros_setup

Support macros for building micro-ROS-based firmware.
Apache License 2.0
336 stars 128 forks source link

Problems with include path of libraries in microros #664

Open N-K1998 opened 9 months ago

N-K1998 commented 9 months ago

Issue template

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.

pablogs9 commented 9 months ago

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.

N-K1998 commented 9 months ago

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

pablogs9 commented 9 months ago

That should be enought

N-K1998 commented 9 months ago

Ok, I try and then I report.