You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In sc_string_view.h, the class sc_string_view is declared as:
class SC_API sc_string_view
: public std::string_view
{
...
}
As a result, when systemc is built as a DLL on windows (ie. SC_API == __declspec(dllexport)), the DLL exports the symbols of std::string_view.
This makes systemc.dll unusable in a project that contains:
A.cpp file that does not #include but uses std::string_view
B.cpp file that uses SystemC stuff
Such project will not be able to link against systemc.dll. This is because A.obj will contain local symbols of std::string_view, B.obj will refer to imported symbols of std::string_view. The linker will complain on multiply defined symbols.
Since all members of sc_string_view are inline, the solution for the issue seems to be just removing the SC_API modifier from the declaration.