# HG changeset patch # User Chris Cannam # Date 1497367464 -3600 # Node ID fdab0a246298e348549d4923b545d9a8763147e1 # Parent d00199f3b010159d5b9e292a9e83ff55185d0150 Report and fail if no plugins found (i.e. wrong library name, usually) diff -r d00199f3b010 -r fdab0a246298 vamp-stubber/stubber.cpp --- a/vamp-stubber/stubber.cpp Tue Jun 13 16:07:58 2017 +0100 +++ b/vamp-stubber/stubber.cpp Tue Jun 13 16:24:24 2017 +0100 @@ -322,7 +322,13 @@ } string libname = arg; - + + auto li = libname.rfind('.'); + if (li != std::string::npos) { + cerr << "NOTE: library name is to be specified without extension, dropping \"" << libname.substr(li) << "\"" << endl; + libname = libname.substr(0, li); + } + try { initFds(false); } catch (exception &e) { @@ -336,6 +342,16 @@ resumeOutput(); + if (resp.available.empty()) { + cerr << "ERROR: No plugin(s) found in library named \"" + << libname << "\"\nCheck that the library name is correct and the right files are in $VAMP_PATH.\nThat would mean either " + << libname << ".so, " << libname << ".dll, or " << libname + << ".dylib (depending on your platform), as well as " + << libname << ".n3 and " << libname << ".cat." + << endl; + exit(1); + } + emitFor(libname, resp); exit(0);