Jump to content
Sign in to follow this  
hadjer

Error : no matching function for call to SC_start

Recommended Posts

Bonjours,

I am new to systemC and i have ubuntu 12.04 and systemc 2.3

I was trying to run this example code from this link but there is an error I cant resolve.

Can you please help. This is the errors I get.

 test_shift.cpp:51:16: error: no matching function for call to `sc_start(int)' test_shift.cpp:51:16: note: candidates are: /usr/local/systemc/include/sysc/kernel/sc_simcontext.h:106:13: note: void sc_core::sc_start() /usr/local/systemc/include/sysc/kernel/sc_simcontext.h:106:13: note: candidate expects 0 arguments, 1 provided /usr/local/systemc/include/sysc/kernel/sc_simcontext.h:173:17: note: void sc_core::sc_start(const sc_core::sc_time&, sc_core::sc_starvation_policy) /usr/local/systemc/include/sysc/kernel/sc_simcontext.h:173:17: note: no known conversion for argument 1 from `int' to `const sc_core::sc_time&' /usr/local/systemc/include/sysc/kernel/sc_simcontext.h:109:13: note: void sc_core::sc_start(int, sc_core::sc_time_unit, sc_core::sc_starvation_policy) /usr/local/systemc/include/sysc/kernel/sc_simcontext.h:109:13: note: candidate expects 3 arguments, 1 provided /usr/local/systemc/include/sysc/kernel/sc_simcontext.h:115:13: note: void sc_core::sc_start(double, sc_core::sc_time_unit, sc_core::sc_starvation_policy) /usr/local/systemc/include/sysc/kernel/sc_simcontext.h:115:13: note: candidate expects 3 arguments, 1 provided make: *** [test_shift.o] Error 1

Thanks.

Share this post


Link to post
Share on other sites

Hi,

I tried the example from that page:

http://comelec.enst..../test_shift.tgz

It compiles and runs fine in my case. ( 64bit CentOS6.2 and SystemC 2.3.0, gcc 4.4.2)

Did you install SystemC 2.3.0 correctly?

After untarring I edited this line in the Makefile to point to my SystemC 2.3.0 install

SYSTEMC = /home/ginov/Desktop/systemc-2.3.0_install/

Next type gmake , it makes simulation.x

Which you can run with

LD_LIBRARY_PATH=<path to your SystemC lib> ./simulation.x

Could you check your SystemC 2.3.0 installation?

Best regards,

Gino

Share this post


Link to post
Share on other sites

Hi,

I looked again at that webpage.

I guess you copied the text from the webpage, which is wrong, and didn't use the tar file:

sc_start(1);

which should be

sc_start(1,SC_NS);

This causes the compile error you see. So please correct these 2 sc_start() calls.

In the tar file it is correct.

Best regards,

Gino

Share this post


Link to post
Share on other sites

thank you very much for your answer

but this error appeared to me in Sev example, even in the compilation of the model given in this link and also in the compilation of another example.

PS: SystemC is installed correctly

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×