Jump to content

Mohamed A. Bamakhrama

  • Posts

  • Joined

  • Last visited

Profile Information

  • Location
    Eindhoven, The Netherlands

Mohamed A. Bamakhrama's Achievements


Member (1/2)



  1. Hi all, I am running into a very weird exception when I try to build SystemC applications that contain `SC_THREAD` under Visual Studio 2019. I managed to prepare a small reproduction example (see attached file) which looks like: #include <systemc> SC_MODULE(Test) { SC_HAS_PROCESS(Test); explicit Test(sc_core::sc_module_name name) : sc_module(name) { SC_THREAD(busy); } void busy(void) { for(int i = 0; i < 10; i++) { sc_core::wait(1, sc_core::SC_NS); printf("busy\n"); } sc_core::sc_stop(); } }; int sc_main(int, char *[]) { Test ttt("ttt"); sc_core::sc_start(); return EXIT_SUCCESS; } The program is compiled using the attached CMakeLists.txt file. Upon execution, it runs into an exception and when I look in the debugger, the exception comes from: The same program runs without any issues when compiled using GCC 9.2 on CentOS 7. On Windows, I am using Windows 10 with VS 2019 Enterprise. Did anyone else run into similar issues when trying SystemC 2.3.3 with VS 2019? Edit 1: Issue has been resolved. It turns out that you need to pass `/GR` and `/vmg` in the compile flags. Best Regards, Mohamed CMakeLists.txt ctor.cc
  • Create New...