Jump to content

SystemC-2.3.2 drops cstring

Recommended Posts


SystemC 2.3.2 has improved support for C++11, but with that update, cstring has been removed from systemc.h header file. 

This implies in a breakage in systemc-ams build because sca_tdf_ct_ltf_nd_proxy and sca_tdf_ct_vector_ss_proxy uses memset and memcpy. A simple fix would be to include <cstring> to both headers:

  • scams/impl/predefined_moc/tdf/sca_tdf_ct_ltf_nd_proxy.h
  • scams/impl/predefined_moc/tdf/sca_tdf_ct_vector_ss_proxy.h


Link to comment
Share on other sites

I've just found out that SystemC-2.3.2 can be compiled with SC_INCLUDE_EXTRA_STD_HEADERS to include <cstring>. This should be used when configuring, right before make. With this, there is no need to modify SystemC-AMS header files.

$ mkdir build
$ cd build
$ ../configure CXXFLAGS="-DSC_INCLUDE_EXTRA_STD_HEADERS" --prefix=/usr --otheroptions...
$ make
$ make install


Link to comment
Share on other sites

  • 1 month later...
8 hours ago, Alaba said:

I just modified the two header files before reading your comment  :)

  • scams/impl/predefined_moc/tdf/sca_tdf_ct_ltf_nd_proxy.h
  • scams/impl/predefined_moc/tdf/sca_tdf_ct_vector_ss_proxy.h

by adding #include<string.h>

and it compiled fine

I'm runing xubuntu 17.10



Instead of #include <string.h>, you should better #include <cstring> and then add std:: prefixes to the string function calls, which are not found. This avoids polluting your public namespace with identifiers from string.h.

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.

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...