diff --git a/test/MeshViewer.cpp b/test/MeshViewer.cpp
index 3af6d743..a0f613b3 100644
--- a/test/MeshViewer.cpp
+++ b/test/MeshViewer.cpp
@@ -13,6 +13,8 @@
 #   include "config.h"
 #endif
 
+#include <cfloat> /* for FLT_MAX */
+
 #include "core.h"
 
 using namespace std;