You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I recently upgraded a project of mine from v0.4.8 to v0.7.0 of this library and it broke my build. My compiler was complaining that a reference to 'Slave' is ambiguous , since another library I'm using also defines a Slave object. At first glance this error was odd to me, since the Dynamixel2Arduino slave class is nicely defined in its own namespace to avoid name clashes.
However, after digging a little deeper, I was able to isolate the problem to a specific update made in v0.7.0 (v0.6.3 does not cause me any issues). It looks like a using namespace DYNAMIXEL line was added to the protocol.h file here. Since this protocol.h file is included by utility/master.h which is included by Dynamixel2Arduino.h, any file that includes the Dynamixel2Arduino.h header is silently configured to use the DYNAMIXEL namespace.
This doesn't seem like intended behavior, since always using a namespace upon including a header basically defeats the purpose of having a namespace to begin with. So I'm hoping it's possible to make a patch here that removes the using namespace DYNAMIXEL line in protocol.h and just explicitly references the DYNAMIXEL namespace in the areas of protocol.h and protocol.cpp where it is needed.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi! I recently upgraded a project of mine from v0.4.8 to v0.7.0 of this library and it broke my build. My compiler was complaining that a
reference to 'Slave' is ambiguous
, since another library I'm using also defines aSlave
object. At first glance this error was odd to me, since the Dynamixel2Arduino slave class is nicely defined in its own namespace to avoid name clashes.However, after digging a little deeper, I was able to isolate the problem to a specific update made in v0.7.0 (v0.6.3 does not cause me any issues). It looks like a
using namespace DYNAMIXEL
line was added to the protocol.h file here. Since this protocol.h file is included by utility/master.h which is included by Dynamixel2Arduino.h, any file that includes the Dynamixel2Arduino.h header is silently configured to use theDYNAMIXEL
namespace.This doesn't seem like intended behavior, since always using a namespace upon including a header basically defeats the purpose of having a namespace to begin with. So I'm hoping it's possible to make a patch here that removes the
using namespace DYNAMIXEL
line in protocol.h and just explicitly references the DYNAMIXEL namespace in the areas of protocol.h and protocol.cpp where it is needed.Thanks!
The text was updated successfully, but these errors were encountered: