Jump to content


  • Content Count

  • Joined

  • Last visited

  1. Hi I am able to run Hello.cpp and other simple programs - but when try for the code below I added sc_signal< sc_int<4> > a,b,sum; to my .cpp , i am getting the following issue during linking time `sc_dt::sc_int_base::print(std::ostream&) const': /usr/local/systemc-2.3/include/sysc/datatypes/int/sc_int_base.h:865: undefined reference to `sc_dt::sc_int_base::to_string[abi:cxx11](sc_dt::sc_numrep, bool) const' collect2: error: ld returned 1 exit status Makefile.rules:150: recipe for target 'a.x' failed My code is pasted below #include "systemc.h" SC_MODULE(tff_async_reset){ sc_in <bool> data,clk,reset; sc_out <bool> q; bool q_l; void atff(){ if(~reset.read()){ q_l = 0; } else if(data.read()) { q_l = !q_l; } q.write(q_l); } SC_CTOR(tff_async_reset) { SC_METHOD (atff); sensitive << reset; sensitive << clk.pos(); } }; int sc_main(int argc , char* argv[]) { sc_signal< sc_int<4> > a,b,sum; sc_signal<bool> clk; return(0); } I use the below command for compiling/linking g++ -g -Wall -pedantic -Wno-long-long -Werror -L. -L.. -L /usr/local/systemc-2.3/lib-linux64/ -Wl,-rpath=/usr/local/systemc-2.3/lib-linux64 -o a.x tff_async_reset.o -lsystemc -lm If I remove the line sc_signal< sc_int<4> > a,b,sum; the above command passes Any help ? rgds bijoy
  • Create New...