micro-ROS / micro_ros_stm32cubemx_utils

A set of utilities for integrating micro-ROS in a STM32CubeMX project
Apache License 2.0
159 stars 60 forks source link

lib microros cannot be found #140

Open kartman88 opened 6 months ago

kartman88 commented 6 months ago

Hi I'm working on Windows 11 with STM32CubeIde and I have a problem while building that is the following: C:/ST/STM32CubeIDE_1.14.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -lmicroros: No such file or directory collect2.exe: error: ld returned 1 exit status make: *** [makefile:69: micro_ros.elf] Error 1 "make -j20 all" terminated with exit code 2. Build might be incomplete. I think this is related to the step 4. I double checked the path to see if it was correct and it seems right.

totolerest commented 6 months ago

you may follow this first then will got the lib microros folder image

kartman88 commented 6 months ago

I did that and followed everything exactly as in the readme but still have this error only on windows

totolerest commented 6 months ago

Could you share the screen capture of GCC Linker on no.4?

kartman88 commented 6 months ago

I have ../ because was working on Linux but I've tried with the absolute path too and got the same error. Screenshot 2024-02-22 093456

totolerest commented 6 months ago

Hmmm... Weird. BTW, when I build the project I did not put this in prebuild step. Screenshot_2024-02-22-15-45-16-51_40deb401b9ffe8e1df2f1cc5ba480b12

kartman88 commented 6 months ago

Same, I skipped to step 4. Can I ask you what you have put in the docker command. The absolute path like something/workspace/name_of_project ? And did you follow the step 3? because without that I had another error while by following it I got the -lmicroros not found error. The error i got without the step 3 is:

../Core/Src/dma_transport.c:1:10: fatal error: uxr/client/transport.h: No such file or directory
    1 | #include <uxr/client/transport.h>

and the other one is:

../Core/Src/main.c:25:10: fatal error: rcl/rcl.h: No such file or directory
   25 | #include <rcl/rcl.h>
totolerest commented 6 months ago

I just skip no.2 but I follow the rest. Step 3 is add path that need to add I also checkout the humble project. Screenshot_2024-02-22-16-04-51-84_40deb401b9ffe8e1df2f1cc5ba480b12 For docker command I follow the instructions

this I put the folder that I checkout humble At the end of 2nd command is humble which match with the version that I checkout. /micro_ros_static_library_builder**:humble** I case you checkout iron you may try to change to iron and run command again.
kartman88 commented 6 months ago

I'm already working on humble. About the step number 3 did you put what was written in the guide:

micro_ros_stm32cubemx_utils/microros_static_library_ide/libmicroros/include

Or did you put something different like:

../micro_ros_stm32cubemx_utils/microros_static_library_ide/libmicroros/include

Or absolute path

totolerest commented 6 months ago

No, I browse it manually to the destination folder which could be absolute path.