gurunath.kadam Posted September 24, 2019 Report Share Posted September 24, 2019 I have successful installation of SystemC 2.3.3 on Visual Studio 2017. All the enclosed examples compile and run successful. However, when I create a simple example (listed here: https://www.edaplayground.com/x/5UHA, un-comment lines 4 and 5 in testbench.cpp ), it throws an exception. The exception is thrown at line: SC_METHOD(op_DFF); And the exception thrown is // CHECK IF THIS IS AN sc_module-BASED PROCESS AND SIMUALTION HAS STARTED: if ( dynamic_cast<sc_module*>(host_p) != 0 && sc_is_running() ) { report_error( SC_ID_MODULE_METHOD_AFTER_START_, "" ); sc_abort(); // can't recover from here } in file "sc_method_process.cpp". The example runs okay on the EDA Playground, which I believe uses g++. Any tips to resolve this on VS2017? Thank you. Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted September 24, 2019 Report Share Posted September 24, 2019 I don't immediately see a problem in code. Just a guess: Have you configured all compiler flags? In case you use CMake it should be automatic. If you create project manually you can check here https://stackoverflow.com/questions/41990606/installing-systemc-for-vs2013/41991699 Quote Link to comment Share on other sites More sharing options...
gurunath.kadam Posted September 25, 2019 Author Report Share Posted September 25, 2019 @Roman Popov Hi Roman, thanks for the link. I found the problem -- it was really stupid. I had Debug + x86 selected in VS, but in the properties it was Release + x64. I changed it in the second place as well, which changed the compiler + linker options, and the run time exception was eliminated. Thanks again. Quote Link to comment Share on other sites More sharing options...
REFarrell Posted November 3, 2021 Report Share Posted November 3, 2021 I'm in a similar situation, but I couldn't even get the examples to run: compiler couldn't find the systemC include files. Should the build have updated the appropriate environment variable? I don't know anything about running Visual Studio (usually run Linux but not possible in this case.) I saw in the install notes about setting an environment variable to point to the include files and libraries. Do I need to do this? I also found in Visual Studio about setting project sheets and such. Each thing I looked at seemed to be saying "this is the old way of doing this. Do this other instead." Running Windows 10, VS 2017. Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.