simulator: remove unused includes, and reorder a few includes to fix conflicts

Conflicts happen only on msys2 with wxWidgets 3.0. But this minor reorder
allows me to test Kicad compilation with "old" wxWidgets, used on Linux.
This commit is contained in:
jean-pierre charras 2022-11-16 10:09:54 +01:00
parent 85c7cca846
commit b9ac486000
5 changed files with 21 additions and 11 deletions

View File

@ -22,11 +22,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <confirm.h>
// Include simulator headers after wxWidgets headers to avoid conflicts with Windows headers
// (especially on msys2 + wxWidgets 3.0.x)
#include <sim/sim_model_spice.h>
#include <sim/sim_model_raw_spice.h>
#include <sim/spice_model_parser.h>
#include <sim/sim_library_spice.h>
#include <confirm.h>
#include <boost/algorithm/string/trim.hpp>

View File

@ -27,6 +27,11 @@
#include <wx/debug.h>
#include <wx/stc/stc.h>
// 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 <pegtl.hpp>)
// Should not create issues on other platforms
#include <wx/menu.h>
#include <project/project_file.h>
#include <sch_edit_frame.h>
#include <eeschema_id.h>
@ -38,10 +43,8 @@
#include <dialogs/dialog_signal_list.h>
#include <scintilla_tricks.h>
#include "string_utils.h"
#include "ngspice_helpers.h"
#include <pgm_base.h>
#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 <eeschema_settings.h>
#include <wx/ffile.h>
#include <wx/filedlg.h>
#include <dialog_shim.h>
#include <wx_filename.h>

View File

@ -22,14 +22,17 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <sim/sim_property.h>
#include <sim/sim_value.h>
#include <ki_exception.h>
#include <confirm.h>
#include <wx/combo.h>
#include <wx/combobox.h>
#include <wx/notebook.h>
// Include simulator headers after wxWidgets headers to avoid conflicts with Windows headers
// (especially on msys2 + wxWidgets 3.0.x)
#include <sim/sim_property.h>
#include <sim/sim_value.h>
#include <ki_exception.h>
wxBEGIN_EVENT_TABLE( SIM_VALIDATOR, wxValidator )
EVT_KEY_DOWN( SIM_VALIDATOR::onKeyDown )

View File

@ -25,13 +25,13 @@
#ifndef SIM_PROPERTY_H
#define SIM_PROPERTY_H
#include <sim/sim_model.h>
#include <wx/window.h>
#include <wx/notebook.h>
#include <wx/propgrid/propgrid.h>
#include <wx/propgrid/manager.h>
#include <wx/propgrid/props.h>
#include <sim/sim_model.h>
class SIM_VALIDATOR : public wxValidator
{

View File

@ -23,10 +23,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "ngspice.h"
#include <confirm.h>
// 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<SPICE_SIMULATOR> SIMULATOR::CreateInstance( const std::string& )
{
try