diff --git a/common/dialogs/wx_html_report_panel.cpp b/common/dialogs/wx_html_report_panel.cpp
index c654c768a4..4109ff7ebe 100644
--- a/common/dialogs/wx_html_report_panel.cpp
+++ b/common/dialogs/wx_html_report_panel.cpp
@@ -28,6 +28,10 @@
 #include <wx/clipbrd.h>
 #include <kicad_string.h>
 #include <wx/ffile.h>
+#include <wx/log.h>
+#include <wx/filedlg.h>
+#include <wx/msgdlg.h>
+#include <wx/menu.h>
 
 WX_HTML_REPORT_PANEL::WX_HTML_REPORT_PANEL( wxWindow* parent,
                                             wxWindowID id,
diff --git a/common/dialogs/wx_html_report_panel.h b/common/dialogs/wx_html_report_panel.h
index 66b5c0f3e6..4eb7a356fd 100644
--- a/common/dialogs/wx_html_report_panel.h
+++ b/common/dialogs/wx_html_report_panel.h
@@ -22,13 +22,11 @@
 #ifndef __WX_HTML_REPORT_PANEL_H__
 #define __WX_HTML_REPORT_PANEL_H__
 
-#include <wx/wx.h>
 #include <reporter.h>
 #include <vector>
 
 #include "wx_html_report_panel_base.h"
 
-
 /**
  * A widget for browsing a rich text error/status report. Used in numerous
  * dialogs in eeschema and pcbnew. Provides error filtering functionality
diff --git a/common/reporter.cpp b/common/reporter.cpp
index c116572986..ddebbc2688 100644
--- a/common/reporter.cpp
+++ b/common/reporter.cpp
@@ -29,6 +29,9 @@
 #include <reporter.h>
 #include <widgets/infobar.h>
 #include <wx_html_report_panel.h>
+#include <wx/log.h>
+#include <wx/textctrl.h>
+#include <wx/statusbr.h>
 
 REPORTER& REPORTER::Report( const char* aText, SEVERITY aSeverity )
 {
diff --git a/eeschema/dialogs/dialog_plot_schematic.cpp b/eeschema/dialogs/dialog_plot_schematic.cpp
index c190804771..18ba7e29e9 100644
--- a/eeschema/dialogs/dialog_plot_schematic.cpp
+++ b/eeschema/dialogs/dialog_plot_schematic.cpp
@@ -45,6 +45,7 @@
 #include <wx/dirdlg.h>
 #include <wx/msgdlg.h>
 #include <wx/stdpaths.h>
+#include <wx/log.h>
 
 
 // static members (static to remember last state):
diff --git a/pcbnew/dialogs/dialog_board_reannotate.cpp b/pcbnew/dialogs/dialog_board_reannotate.cpp
index 1019fef80a..8bfd5feade 100644
--- a/pcbnew/dialogs/dialog_board_reannotate.cpp
+++ b/pcbnew/dialogs/dialog_board_reannotate.cpp
@@ -37,6 +37,7 @@
 #include <sstream>
 #include <tool/tool_manager.h>
 #include <tool/grid_menu.h>
+#include <wx/valtext.h>
 
 
 bool SortYFirst;
diff --git a/pcbnew/dialogs/dialog_export_svg.cpp b/pcbnew/dialogs/dialog_export_svg.cpp
index a77a2004ec..9f9c5698bd 100644
--- a/pcbnew/dialogs/dialog_export_svg.cpp
+++ b/pcbnew/dialogs/dialog_export_svg.cpp
@@ -39,6 +39,7 @@
 #include <bitmaps.h>
 #include <widgets/unit_binder.h>
 #include <plotters/plotters_pslike.h>
+#include <wx/dirdlg.h>
 
 class DIALOG_EXPORT_SVG : public DIALOG_EXPORT_SVG_BASE
 {
diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_netlist.cpp
index 16cecc22d8..dc8a77416e 100644
--- a/pcbnew/dialogs/dialog_netlist.cpp
+++ b/pcbnew/dialogs/dialog_netlist.cpp
@@ -41,6 +41,7 @@
 #include <dialog_netlist.h>
 
 #include <wx_html_report_panel.h>
+#include <wx/filedlg.h>
 
 
 void PCB_EDIT_FRAME::InstallNetlistFrame()
diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp
index e1dcbfe4d7..867186dc97 100644
--- a/pcbnew/dialogs/dialog_plot.cpp
+++ b/pcbnew/dialogs/dialog_plot.cpp
@@ -45,6 +45,9 @@
 #include <math/util.h>      // for KiROUND
 #include <macros.h>
 
+#include <wx/dirdlg.h>
+
+
 
 DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aParent ) :
     DIALOG_PLOT_BASE( aParent ), m_parent( aParent ),
diff --git a/pcbnew/exporters/export_footprints_placefile.cpp b/pcbnew/exporters/export_footprints_placefile.cpp
index c76b9593ea..95c9a1676c 100644
--- a/pcbnew/exporters/export_footprints_placefile.cpp
+++ b/pcbnew/exporters/export_footprints_placefile.cpp
@@ -34,6 +34,8 @@
 #include <export_footprints_placefile.h>
 #include <pad.h>
 
+#include <wx/dirdlg.h>
+
 class LIST_MOD      // An helper class used to build a list of useful footprints.
 {
 public:
diff --git a/pcbnew/exporters/gen_footprints_placefile.cpp b/pcbnew/exporters/gen_footprints_placefile.cpp
index 78e4bfbf43..810f6d9538 100644
--- a/pcbnew/exporters/gen_footprints_placefile.cpp
+++ b/pcbnew/exporters/gen_footprints_placefile.cpp
@@ -44,6 +44,8 @@
 #include <export_footprints_placefile.h>
 #include "gerber_placefile_writer.h"
 
+#include <wx/dirdlg.h>
+
 
 /**
  * The dialog to create footprint position files and choose options (one or 2 files, units
diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp
index c3030120ee..8015b347c7 100644
--- a/pcbnew/pcb_edit_frame.cpp
+++ b/pcbnew/pcb_edit_frame.cpp
@@ -104,6 +104,8 @@
 #include <action_plugin.h>
 #include "../scripting/python_scripting.h"
 
+#include <wx/filedlg.h>
+
 
 using namespace std::placeholders;