Fallback to system ngspice library when libngspice is not found in other paths on macOS

This commit is contained in:
Maciej Suminski 2018-04-19 14:48:31 +02:00
parent 2865084ce8
commit e3a06dca70
1 changed files with 4 additions and 3 deletions

View File

@ -313,9 +313,10 @@ void NGSPICE::init_dll()
break;
}
}
#else /* not __WINDOWS || __WXMAC__ */
m_dll.Load( wxDynamicLibrary::CanonicalizeName( "ngspice" ) );
#endif
if( !m_dll.IsLoaded() ) // try also the system libraries
#endif /* __WINDOWS || __WXMAC__ */
m_dll.Load( wxDynamicLibrary::CanonicalizeName( "ngspice" ) );
if( !m_dll.IsLoaded() )
throw std::runtime_error( "Missing ngspice shared library" );