diff --git a/gtsam/inference/LabeledSymbol.cpp b/gtsam/inference/LabeledSymbol.cpp index 6d34883fa..e67c56e5e 100644 --- a/gtsam/inference/LabeledSymbol.cpp +++ b/gtsam/inference/LabeledSymbol.cpp @@ -123,7 +123,7 @@ boost::function LabeledSymbol::TypeLabelTest(unsigned char c, } /* ************************************************************************* */ -std::ostream &operator<<(std::ostream &os, const LabeledSymbol &symbol) { +GTSAM_EXPORT std::ostream &operator<<(std::ostream &os, const LabeledSymbol &symbol) { os << StreamedKey(symbol); return os; } diff --git a/gtsam/inference/LabeledSymbol.h b/gtsam/inference/LabeledSymbol.h index 5b3ec8766..d46425bb4 100644 --- a/gtsam/inference/LabeledSymbol.h +++ b/gtsam/inference/LabeledSymbol.h @@ -107,7 +107,7 @@ public: LabeledSymbol newLabel(unsigned char label) const { return LabeledSymbol(c_, label, j_); } /// Output stream operator that can be used with key_formatter (see Key.h). - friend std::ostream &operator<<(std::ostream &, const LabeledSymbol &); + friend GTSAM_EXPORT std::ostream &operator<<(std::ostream &, const LabeledSymbol &); private: