Jump to content

Error : no matching function for call to SC_start


hadjer

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.

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...