2 #include <cpPlugins/Interface/Loader.h>
4 int main( int argc, char* argv[] )
8 std::cerr << "Usage: " << argv[ 0 ] << " library" << std::endl;
14 std::string error_message = "";
15 cpPlugins::Interface::Loader loader;
16 for( int i = 1; i < argc; ++i )
20 loader.RegisterFromDirectory( argv[ i ] );
22 catch( std::exception& err )
24 error_message += err.what( ) + std::string( "\n" );
30 if( error_message != "" )
33 << "***************************************" << std::endl
34 << "Errors during load: " << std::endl
35 << error_message << std::endl
36 << "***************************************" << std::endl;
40 // Show loader information
41 std::cout << "---------------------------" << std::endl;
42 std::cout << loader << std::endl;
43 std::cout << "---------------------------" << std::endl;
45 // Close connection to loaded plugins file
46 loader.UnRegisterAll( );
49 std::cout << "---------------------------" << std::endl;
50 std::cout << loader << std::endl;
51 std::cout << "---------------------------" << std::endl;