micro-ROS/freertos_apps

Add dependencies with colcon.meta and compile multiple .c files

pnn16004 opened this issue · 1 comments

  • Hardware description: ESP32
  • RTOS: FreeRTOS
  • Installation type: Ubuntu 20.04.3 LTS (Focal Fossa), ROS 2 Foxy desktop, micro_ros_setup
  • Version or commit hash: foxy

I took the int32_publisher example and restructured it into app.c, config.c and config.h. When I build the firmware it won't recognize the function in config.c I use in app.c. I put the function in config.h and all that stuff, so it's probably that it isn't compiling config.c, it just says 'undefined reference to...', here's the full terminal: https://justpaste.it/6nku1.

With CMakeLists.txt you can just add dependencies and there are examples on how to do it. But with colcon.meta I can't find any examples on how to do it, and I'm not even sure that's where you're supposed to add dependencies. Can someone show or link me how to do it, I couldn't find it by searching.

Sorry if it's a newbie question, but I really can't find how to do it.

I accidentally named it "config" and not "config.c", all my assumptions were wrong, no need to mess around with colcon.meta. Very silly of me, please ignore.