diff --git a/gtsam/inference/Key.cpp b/gtsam/inference/Key.cpp index 15d633eeb..073a545c3 100644 --- a/gtsam/inference/Key.cpp +++ b/gtsam/inference/Key.cpp @@ -28,6 +28,7 @@ namespace gtsam { /// Assign default key formatter KeyFormatter DefaultKeyFormatter = &_defaultKeyFormatter; +KeyFormatter MultiRobotKeyFormatter = &_multirobotKeyFormatter; /* ************************************************************************* */ string _defaultKeyFormatter(Key key) { diff --git a/gtsam/inference/Key.h b/gtsam/inference/Key.h index a02d018f5..59f5ecf50 100644 --- a/gtsam/inference/Key.h +++ b/gtsam/inference/Key.h @@ -57,8 +57,7 @@ GTSAM_EXPORT std::string _multirobotKeyFormatter(gtsam::Key key); /// formatter in print functions. /// /// Checks for LabeledSymbol, Symbol and then plain keys, in order. -static const gtsam::KeyFormatter MultiRobotKeyFormatter = - &_multirobotKeyFormatter; +extern GTSAM_EXPORT KeyFormatter MultiRobotKeyFormatter; /// To use the key_formatter on Keys, they must be wrapped in a StreamedKey. struct StreamedKey {