Search the Community
Showing results for tags 'compile error'.
-
So, I'm trying to compile my main.cpp that includes three modules. For instance I got a module counter with this .h file #include <systemc.h> SC_MODULE(counter) { sc_in<bool> clk; //porta ingresso clock sc_in<bool> load; //porta ingresso load sc_in<bool> clear; //porta ingresso clear sc_in<sc_uint<8> > din; //porta ingresso dato (intero 8 bit) sc_out<sc_uint<8> > dout; //porta uscita dato (intero 8 bit) unsigned int countval; //valore del contatore (intero senza segno) void counting(); //funzione conteggio (il mio processo) SC_CTOR(counter) { //costruttore di counting() SC_METHOD(counting); //costruttore del mio processo attraverso metodo (meglio del thread) sensitive << clk.pos(); //sensibile al fronte del clock, positivo } }; now, when I run the compiler with g++ -I/usr/local/systemc-2.3.3/include -L/usr/local/systemc-2.3.3/lib-linux64/ -lsystemc -lm -o out main.cpp but I got this error /tmp/ccz92lN5.o: In function `counter::counter(sc_core::sc_module_name)': main.cpp:(.text._ZN7counterC2EN7sc_core14sc_module_nameE[_ZN7counterC5EN7sc_core14sc_module_nameE]+0xba): undefined reference to `counter::counting()' How do I fix it?
-
Hi, I got some problems with the systemc ams library, and came to a point where i run out of ideas what to do, where to search for solutions... I try to learn systemc-ams, and therefore i don't know too much about it yet, but i got some normal systemc examples done. Now i tried to do something with the ams-extension but i got following compile error: make all Building target: caes Invoking: GCC C++ Linker g++ -L/home/mks/systemc/systemcams/lib-linux -L/home/mks/systemc/systemc/lib-linux -o "caes" ./sine/main.o ./shiftreg/main.o ./lfsr/main.o ./first_counter/first_counter.o ./first_counter/first_counter_tb.o ./fifo-int-3/main.o ./fifo-int-2/main.o ./fifo-int/main.o ./cordic/main.o -lsystemc-ams -lsystemc /usr/bin/ld: error: /home/mks/systemc/systemcams/lib-linux/libsystemc-ams.a(sca_implementation_info.o): incompatible target sca_vcd_trace.cpp:470: error: undefined reference to 'sca_core::sca_version()' collect2: ld gab 1 als Ende-Status zurück make: *** [caes] Fehler 1 Anyone knows what to do about this? regards mks