Jump to content


  • Content count

  • Joined

  • Last visited

  1. Edward1110

    error: ‘sc_port’ was not declared in this scope

    Dear Ameya, Thank you for your answer I don't know how to run systemc code on codeblcok, so I didn't get the console output, but I am trying to work it out. I used my pc.cpp file this time, which I put into attachment I tried you command g++ -I. -I$SYSTEMC_HOME/include -L. -L$SYSTEMC_HOME/lib-linux64 -Wl,-rpath=$SYSTEMC_HOME/lib-linux64 -std=c++11 -o hello pc.cpp -lsystemc -lm/home/usr/local/systemc-2.3.2/lib-linux64/libsystemc.so The output is /usr/bin/ld: cannot find -lm/home/usr/local/systemc-2.3.2/lib-linux64/libsystemc.so collect2: error: ld returned 1 exit status But I tried this command g++ -I. -I$SYSTEMC_HOME/include -L. -L$SYSTEMC_HOME/lib-linux64 -Wl,-rpath=$SYSTEMC_HOME/lib-linux64 -std=c++11 -o hello pc.cpp -lsystemc -lm /tmp/ccfTt0wt.o: In function `__static_initialization_and_destruction_0(int, int)': pc.cpp:(.text+0xd60): undefined reference to `sc_core::sc_api_version_2_3_2_cxx201103L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_2_cxx201103L(sc_core::sc_writer_policy)' collect2: error: ld returned 1 exit status and there is still no output file. pc.cpp
  2. Hi all, I just installed systemc on my new computer with ubuntu. And I tried to run the code I wrote before which work perfectly fine on my other computer with Ubuntu. But I got the error: ''jump_addr' was not declared in this scope for all my ports and arguments with 'sc_bv' and 'sc_lv' type. Anyone knows what is going on, am I missing some thing in my system? export SYSTEMC_HOME=/usr/local/systemc-2.3.2/ g++ -I. -I$SYSTEMC_HOME/include -L. -L$SYSTEMC_HOME/lib-linux64 -Wl,-rpath=$SYSTEMC_HOME/lib-linux64 -o hello pc.h -lsystemc -lm that is the command I used I tried to run several different code, all of them doesn't work, I also tried to install different versions of systemc but the problem still exist. anyway I put one of the codes in the attachment regards, Edward pc.h