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