diff --git a/eeschema/sim/sim_model_spice.cpp b/eeschema/sim/sim_model_spice.cpp index c302bc6ea0..ed73295a2e 100644 --- a/eeschema/sim/sim_model_spice.cpp +++ b/eeschema/sim/sim_model_spice.cpp @@ -22,11 +22,14 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include + +// Include simulator headers after wxWidgets headers to avoid conflicts with Windows headers +// (especially on msys2 + wxWidgets 3.0.x) #include #include #include #include -#include #include diff --git a/eeschema/sim/sim_plot_frame.cpp b/eeschema/sim/sim_plot_frame.cpp index 22668a2d24..f5f9e444ad 100644 --- a/eeschema/sim/sim_plot_frame.cpp +++ b/eeschema/sim/sim_plot_frame.cpp @@ -27,6 +27,11 @@ #include #include +// For some obscure reason, needed on msys2 with some wxWidgets versions (3.0) to avoid +// undefined symbol at link stage (due to use of #include ) +// Should not create issues on other platforms +#include + #include #include #include @@ -38,10 +43,8 @@ #include #include #include "string_utils.h" -#include "ngspice_helpers.h" #include #include "ngspice.h" -#include "sim_plot_colors.h" #include "sim_plot_frame.h" #include "sim_plot_panel.h" #include "spice_simulator.h" @@ -52,7 +55,6 @@ #include #include #include -#include #include diff --git a/eeschema/sim/sim_property.cpp b/eeschema/sim/sim_property.cpp index 7e5580695e..88f5332456 100644 --- a/eeschema/sim/sim_property.cpp +++ b/eeschema/sim/sim_property.cpp @@ -22,14 +22,17 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include -#include #include #include #include #include +// Include simulator headers after wxWidgets headers to avoid conflicts with Windows headers +// (especially on msys2 + wxWidgets 3.0.x) +#include +#include +#include + wxBEGIN_EVENT_TABLE( SIM_VALIDATOR, wxValidator ) EVT_KEY_DOWN( SIM_VALIDATOR::onKeyDown ) diff --git a/eeschema/sim/sim_property.h b/eeschema/sim/sim_property.h index e9450d5a49..d256370096 100644 --- a/eeschema/sim/sim_property.h +++ b/eeschema/sim/sim_property.h @@ -25,13 +25,13 @@ #ifndef SIM_PROPERTY_H #define SIM_PROPERTY_H -#include -#include #include #include #include #include +#include + class SIM_VALIDATOR : public wxValidator { diff --git a/eeschema/sim/spice_simulator.cpp b/eeschema/sim/spice_simulator.cpp index 1627ec9e33..8396a8c2c4 100644 --- a/eeschema/sim/spice_simulator.cpp +++ b/eeschema/sim/spice_simulator.cpp @@ -23,10 +23,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "ngspice.h" - #include +// Include simulator headers after wxWidgets headers to avoid conflicts with Windows headers +// (especially on msys2 + wxWidgets 3.0.x) +#include "ngspice.h" + std::shared_ptr SIMULATOR::CreateInstance( const std::string& ) { try