Closed jimmy-mcelwain closed 1 day ago
Right. This is likely a result of the fact all .c
s are included automatically in the mpBuilder
build in VS.
Tests_ActionServer_FJT.c
is not intended to be compiled stand-alone. It gets #include
d at the end of ActionServer_FJT.c
exactly because it needs access to those two static
functions:
not too nice (#include
-ing a .c
), but there isn't really any other way I believe.
I'll see if I can guard against this problem by adding some preprocessor directives.
Just as a note (perhaps even just to /self
): c97a623bf70c64171771648b7d9d07bcfae7f882 adds Test_ActionServer_FJT.c
to the VS project. It was not added to the project on purpose :)
@ted-miller: does mpBuilder
honour VS project settings which exclude a file from the build?
does mpBuilder honour VS project settings which exclude a file from the build?
Nope.
What's the motivation to make those functions static?
does mpBuilder honour VS project settings which exclude a file from the build?
Nope.
Unfortunate, as that would've been an easy way to solve this.
What's the motivation to make those functions static?
I've used it here to mark them as private functions: they are implementation details, and only exist to make the function that calls them easier to read.
I'll use preprocessor directives to avoid building that file by itself.
I've just opened #273, which should avoid the issue.
It's not unique to VS of course. Any attempt to include Tests_ActionServer_FJT.c
in a build would cause the same build error.
When I try to compile with
MOTOROS2_TESTING_ENABLE
, I get the following outputThe problem appears to be that
Ros_ActionServer_FJT_Parse_GoalPosTolerances
andRos_ActionServer_FJT_Reorder_TrajPt_To_Internal_Order
are both static functions defined withinActionServer_FJT.c
, but they are being referenced inTests_ActionServer_FJT.c
.