diff --git a/CMakeLists.txt b/CMakeLists.txt index bffb99c177e10573bd54b12d8f716c547450b59d..fbe7a20d59b7aa53345d7a74dd3c987ac20124c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,7 +67,7 @@ OPTION(GENERATE_DOC "Generate html documentation" ON) # --- BOOST --------------------------------------------------- SET(Boost_THREAD_FOUND 0) -FIND_PACKAGE(Boost COMPONENTS thread) +FIND_PACKAGE(Boost COMPONENTS thread REQUIRED) IF(Boost_THREAD_FOUND) #MESSAGE(STATUS "Boost_THREAD_LIBRARY:" ${Boost_THREAD_LIBRARY}) #MESSAGE(STATUS "Boost_THREAD_LIBRARY_RELEASE:" ${Boost_THREAD_LIBRARY_RELEASE}) diff --git a/include/dynamic-graph/signal.h b/include/dynamic-graph/signal.h index 9c0e3e92f0dcbca048919746229f795a1a80dfb5..2928aea41531e422839803985c3ce279cfffbdc6 100644 --- a/include/dynamic-graph/signal.h +++ b/include/dynamic-graph/signal.h @@ -124,7 +124,7 @@ protected: public: - virtual void checkCompatibility( void ) { throw Tcopy; } + virtual void checkCompatibility( void ) { throw Tcopy; } private: const T& setTcopy( const T& t ); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 35eae48bf9423baf77a2858767312d97c648d90e..77f7d96091bd669e114ce8047842f5c37eb7ccf7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -49,6 +49,8 @@ IF (UNIX) TARGET_LINK_LIBRARIES(${LIBRARY_NAME} dl pthread) ENDIF (UNIX) +TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${Boost_LIBRARIES}) + INSTALL(TARGETS ${LIBRARY_NAME} DESTINATION lib) @@ -72,7 +74,8 @@ ADD_LIBRARY(${plugin} "${plugin_file}.cpp") TARGET_LINK_LIBRARIES(${plugin} - ${PROJECT_NAME} ${${plugin}_dependancy}) + ${PROJECT_NAME} ${${plugin}_dependancy} + ${Boost_LIBRARIES}) SET_TARGET_PROPERTIES(${plugin} PROPERTIES diff --git a/src/dgraph/interpreter.cpp b/src/dgraph/interpreter.cpp index 9236029476b2285daa86d558990475c740093798..6c0dc911a48c29cb2089e808a2637f04c689d9ba 100644 --- a/src/dgraph/interpreter.cpp +++ b/src/dgraph/interpreter.cpp @@ -64,13 +64,14 @@ registerFunction( const string& funname, if( funkey != functionMap.end() ) // key does exist { if( initDone ) - { - dgDEBUG(15) << "!! Another function already defined with the same name. " - << "Funname is" <<funname.c_str() << endl; - } - throw ExceptionFactory( ExceptionFactory::FUNCTION_CONFLICT, - "Another function already defined with the same name. ", - "Funname is <%s>.",funname.c_str() ); + { + dgDEBUG(15) << "!! Another function already defined with the same name. Overloading " + << "Funname is" <<funname.c_str() << endl; + throw ExceptionFactory( ExceptionFactory::FUNCTION_CONFLICT, + "Another function already defined with the same name. ", + "Funname is <%s>.",funname.c_str() ); + + } } else { @@ -475,7 +476,7 @@ shell( std::istream& sin, std::ostream& sout, const std::string& promptUser ) istringstream args (cmdArgs); try{ cmd(cmdLine,args,sout); } - catch( ExceptionAbstract& e ) { dgDEBUG(1) << e; throw e; } + catch( exception& e ) { dgDEBUG(1) << e.what(); throw e; } catch(...) { dgDEBUG(1) << "!! unknow!." <<endl; throw; } } } diff --git a/src/traces/tracer-real-time.cpp b/src/traces/tracer-real-time.cpp index 8c876b0676d155f54e12b21368839a49502a0654..718d118415264c9d062be689ccaf06068cb7165e 100644 --- a/src/traces/tracer-real-time.cpp +++ b/src/traces/tracer-real-time.cpp @@ -131,7 +131,9 @@ openFile( const SignalBase<int> & sig, dgDEBUG(5) << "Sig <"<<sig.getName() << ">: new file "<< filename << endl; std::ofstream * newfile = new std::ofstream( filename.c_str() ); + dgDEBUG(5) << "Newfile:" << (void*) newfile << endl; hardFiles.push_back( newfile ); + dgDEBUG(5) << "Creating Outstringstream" << endl; //std::stringstream * newbuffer = new std::stringstream(); OutStringStream * newbuffer = new OutStringStream(); // std::stringstream(); diff --git a/tools/test_shell.cpp b/tools/test_shell.cpp index 9e6a8eaec3995f26c6f92c045c7bd387f341122d..0caf8320a5dd6dc00d02afe14d10debb59eaced0 100644 --- a/tools/test_shell.cpp +++ b/tools/test_shell.cpp @@ -51,9 +51,9 @@ int main( int argc,char** argv ) g_shell.cmd( "run",script,cout ); } } - catch( ExceptionAbstract& e ) + catch( exception& e ) { - cout << "!! In file <" << argv[fileIdx] << "> : " << e <<endl; + cout << "!! In file <" << argv[fileIdx] << "> : " << e.what() <<endl; } catch ( const char* str ) { cout << "!! In file <" << argv[fileIdx] << "> : " @@ -70,9 +70,9 @@ int main( int argc,char** argv ) dgDEBUG(5) << "Shell over." << endl; if( cin.eof() ) break; } - catch( ExceptionAbstract& e ) + catch( exception& e ) { - cout << "!! " << e <<endl; + cout << "!! " << e.what() <<endl; } catch( ... ){ dgDEBUG(5) << "!! Unknown! " <<endl ; } }