From 37b02a3afbff75e62bbd1a7c0a007115e9ccfa9a Mon Sep 17 00:00:00 2001 From: Kynos Date: Fri, 18 Jul 2014 17:32:30 +0200 Subject: [PATCH 1/3] Remove isnan() and isinf() templates from QGC.h for Windows builds Remove isnan() and isinf() templates from QGC.h for Windows builds, this generates errors (already defined in math.h). --- src/QGC.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/QGC.h b/src/QGC.h index 6c822c1..e8e582e 100644 --- a/src/QGC.h +++ b/src/QGC.h @@ -33,22 +33,6 @@ /* Windows fixes */ #ifdef _MSC_VER -/* Needed define for Eigen */ -//#define NOMINMAX -#include -template -inline bool isnan(T value) -{ - return value != value; - -} - -// requires #include -template -inline bool isinf(T value) -{ - return (value == std::numeric_limits::infinity() || (-1*value) == std::numeric_limits::infinity()) && std::numeric_limits::has_infinity; -} #elif defined __APPLE__ #include #ifndef isnan From 58fbf2c453d6de91294751a3352e40d884033eb0 Mon Sep 17 00:00:00 2001 From: Kynos Date: Fri, 18 Jul 2014 19:52:29 +0200 Subject: [PATCH 2/3] Remove isnan() and isinf() templated from QGC.h only if prior to Visual Studio 2013 --- src/QGC.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/QGC.h b/src/QGC.h index e8e582e..f9b0084 100644 --- a/src/QGC.h +++ b/src/QGC.h @@ -33,6 +33,24 @@ /* Windows fixes */ #ifdef _MSC_VER +#if (_MSC_VER < 1800) /* only PRIOR to Visual Studio 2013 */ +/* Needed define for Eigen */ +//#define NOMINMAX +#include +template +inline bool isnan(T value) +{ + return value != value; + +} + +// requires #include +template +inline bool isinf(T value) +{ + return (value == std::numeric_limits::infinity() || (-1 * value) == std::numeric_limits::infinity()) && std::numeric_limits::has_infinity; +} +#endif #elif defined __APPLE__ #include #ifndef isnan From 9a8ca0915e1930a8755b8a46fee7cb91a12887a1 Mon Sep 17 00:00:00 2001 From: Kynos Date: Sat, 19 Jul 2014 13:36:15 +0200 Subject: [PATCH 3/3] Describe which Qt variant to choose for a Windows build --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f33a37..868bbad 100644 --- a/README.md +++ b/README.md @@ -129,8 +129,9 @@ Only compilation using Visual Studio 2010, 2012, and 2013 are supported. * If installing VS2010, make sure to install Service Pack 1, which fixes a linking error: . 2. Download and install the Qt 5.3 libraries for your version of Visual Studio from here: + * The Qt variant should be 32 bit (not 64) and include opengl. For Visual Studio 2013, this could be qt-opensource-windows-x86-msvc2013_opengl-5.3.1.exe for example. -3. **[OPTIONAL]** Go to the QGroundControl folder and then to thirdParty/libxbee and build it following the instructions in win32.README +3. **[OPTIONAL]** Go to the QGroundControl folder and then to libs/thirdParty/libxbee and build it following the instructions in win32.README.txt 4. Open the Qt Command Prompt program from the Start Menu, navigate to the source folder of QGroundControl, and create the Visual Studio project by typing `qmake -tp vc qgroundcontrol.pro`