micro-ROS / freertos_apps

Sample applications for FreeRTOS + micro-ROS
Apache License 2.0
81 stars 50 forks source link

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

Closed pnn16004 closed 2 years ago

pnn16004 commented 2 years ago

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.

pnn16004 commented 2 years ago

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.