diff --git a/Code/Mantid/MantidPlot/src/plot2D/PowerScaleEngine.cpp b/Code/Mantid/MantidPlot/src/plot2D/PowerScaleEngine.cpp
index f601155ec900a0cfce4dba64863296170959c911..2df226e2b2465660f3b8d1360a142a2cf238355a 100644
--- a/Code/Mantid/MantidPlot/src/plot2D/PowerScaleEngine.cpp
+++ b/Code/Mantid/MantidPlot/src/plot2D/PowerScaleEngine.cpp
@@ -28,6 +28,7 @@
  ***************************************************************************/
 
 #include "PowerScaleEngine.h"
+#include "qwt_compat.h"
 
 /*!
   Return a dummy transformation
diff --git a/Code/Mantid/MantidPlot/src/plot2D/ScaleEngine.cpp b/Code/Mantid/MantidPlot/src/plot2D/ScaleEngine.cpp
index 20028f5eeac10e50969c63bab91fff5cf708f40b..75e2e3d9d3b9e0afaacb404c7c685f82372cf4c3 100644
--- a/Code/Mantid/MantidPlot/src/plot2D/ScaleEngine.cpp
+++ b/Code/Mantid/MantidPlot/src/plot2D/ScaleEngine.cpp
@@ -28,6 +28,7 @@
  ***************************************************************************/
 #include "ScaleEngine.h"
 #include "PowerScaleEngine.h"
+#include "qwt_compat.h"
 #include <limits.h>
 
 QwtScaleTransformation* ScaleEngine::transformation() const