From d667d9b464f624cf0c4526b855beabad522f32d8 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 4 Aug 2022 17:01:29 +0200 Subject: [PATCH] Do not include and use sharedspice.h when KICAD_SPICE = OFF --- eeschema/sim/ngspice.h | 6 ++++++ eeschema/sim/ngspice_models.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/eeschema/sim/ngspice.h b/eeschema/sim/ngspice.h index 44c5fa7a75..1afdb412f3 100644 --- a/eeschema/sim/ngspice.h +++ b/eeschema/sim/ngspice.h @@ -32,7 +32,11 @@ #include #include + +#ifdef KICAD_SPICE #include +#endif + #include // We have an issue here where NGSPICE incorrectly used bool for years @@ -163,6 +167,7 @@ private: // Performs DLL initialization, obtains function pointers void init_dll(); +#ifdef KICAD_SPICE // ngspice library functions typedef void ( *ngSpice_Init )( SendChar*, SendStat*, ControlledExit*, SendData*, SendInitData*, BGThreadRunning*, void* ); @@ -202,6 +207,7 @@ private: static int cbBGThreadRunning( NG_BOOL aFinished, int aId, void* aUser ); static int cbControlledExit( int aStatus, NG_BOOL aImmediate, NG_BOOL aExitOnQuit, int aId, void* aUser ); +#endif // Assure ngspice is in a valid state and reinitializes it if need be. void validate(); diff --git a/eeschema/sim/ngspice_models.cpp b/eeschema/sim/ngspice_models.cpp index 4b496b0590..ff6e16b0cf 100644 --- a/eeschema/sim/ngspice_models.cpp +++ b/eeschema/sim/ngspice_models.cpp @@ -23,7 +23,7 @@ */ #include -#include + // This script was originally autogenerated using the a bash script called // generate_ngspice_models.bash, later heavily modified manually. The script can be found in the