Jump to content
Lennard

‘sc_spawn_option’ was not declared in this scope

Recommended Posts

Hi,

in my SC_THREAD I want to start another thread and I am using the sc_spawn method for that. To make it sensitive to the clock, I want to use sc_spawn_options (quick question: If my main thread is sensitive to the same clock signal, do I even need the spawn options?). However, when I try to compile it, it throws an error: error: ‘sc_spawn_option’ was not declared in this scope. When I remove the spawn options (and simply spawn the new Thread without them), I do not get an error.

Here is the code:

sc_spawn_option spawnOption;
spawnOption.set_sensitivity(clock.pos());
sc_spawn(sc_bind(&AtomicFunction::startWorkerThread, this), "testThread", &spawnOption);

This is how I have included systemc:

#define SC_INCLUDE_DYNAMIC_PROCESSES
#include <systemc.h>

This is my build command:

g++ -g -std=c++14 -I include -I /usr/local/systemc-2.3.3/include -I/usr/include/hdf5/serial -Wl,-rpath=/usr/local/systemc-2.3.3/lib-linux64 -pthread -L. -L/usr/local/systemc-2.3.3/lib-linux64 -L/usr/lib/x86_64-linux-gnu/hdf5/serial -c src/virtual/atomicfunction.cpp -o src/virtual/atomicfunction.o -lsystemc -lm -lhdf5

I have already checked /usr/local/systemc-2.3.3/include/ and saw that in the folder sysc/kernel/ are the files sc_spawn_options.h. But even when I include them directly (#include "/usr/local/systemc-2.3.3/include/sysc/kernel/sc_spawn_options.h") it throws the exact same error.

Do I overlook some minor error? Any help is appreciated 🙂

Best regards

Share this post


Link to post
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...