From 95d21a55f17f042e515c1767817110736f600734 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Tue, 19 Jan 2016 18:18:53 -0500 Subject: [PATCH] fixed build on Wisual Studio+OpenCV2 --- corelib/include/rtabmap/core/GeodeticCoords.h | 6 +++--- corelib/src/GeodeticCoords.cpp | 6 +++++- corelib/src/Parameters.cpp | 2 +- utilite/include/rtabmap/utilite/ULogger.h | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/corelib/include/rtabmap/core/GeodeticCoords.h b/corelib/include/rtabmap/core/GeodeticCoords.h index d78d1939..e92fa625 100644 --- a/corelib/include/rtabmap/core/GeodeticCoords.h +++ b/corelib/include/rtabmap/core/GeodeticCoords.h @@ -31,11 +31,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -#include +#include -namespace RTABMAP_EXP rtabmap { +namespace rtabmap { -class GeodeticCoords +class RTABMAP_EXP GeodeticCoords { public: GeodeticCoords(); diff --git a/corelib/src/GeodeticCoords.cpp b/corelib/src/GeodeticCoords.cpp index 9cd1cc51..fa40b748 100644 --- a/corelib/src/GeodeticCoords.cpp +++ b/corelib/src/GeodeticCoords.cpp @@ -42,10 +42,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "rtabmap/core/GeodeticCoords.h" -#include +#include +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif namespace rtabmap { + inline double DEG2RAD(const double x) { return x*M_PI/180.0;} inline double square(const double & value) {return value*value;} diff --git a/corelib/src/Parameters.cpp b/corelib/src/Parameters.cpp index 7e1a5860..ae2c1212 100644 --- a/corelib/src/Parameters.cpp +++ b/corelib/src/Parameters.cpp @@ -30,7 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include +#include #include #include #include "SimpleIni.h" diff --git a/utilite/include/rtabmap/utilite/ULogger.h b/utilite/include/rtabmap/utilite/ULogger.h index 5d468cab..57886d42 100644 --- a/utilite/include/rtabmap/utilite/ULogger.h +++ b/utilite/include/rtabmap/utilite/ULogger.h @@ -379,7 +379,7 @@ public: int line, const char *function, const char* msg, - ...) throw(UException); + ...); /** * Get the time in the format "2008-7-13 12:23:44".