katang Posted July 10, 2018 Report Share Posted July 10, 2018 I made a new installation on Ubuntu 18.04, and followed instructions in https://howto.tech.blog/2016/11/27/installing-systemc-2-3-1/ Apparently it worked fine, but at the last step it gave the error message $ g++ -I. -I$SYSTEMC_HOME/include -L. -L$SYSTEMC_HOME/lib-linux64 -Wl,-rpath=$SYSTEMC_HOME/lib-linux64 -o hello Hello.cpp -lsystemc -lm In file included from Hello.cpp:1:0: /usr/local/systemc-2.3.1//include/systemc.h:120:16: error: ‘std::gets’ has not been declared using std::gets; ^~~~ Is there an error in my install? (SystemC install seemed to run without error message) Quote Link to comment Share on other sites More sharing options...
maehne Posted July 10, 2018 Report Share Posted July 10, 2018 This issue has been fixed in the SystemC 2.3.2 release available from the Accellera website. The function std::gets was definitely removed in the C'11 standard and deprecated in the C++'11 standard so that recent compilers do not provide it anymore as its semantics constitutes a security risk due to buffer overflows. Quote Link to comment Share on other sites More sharing options...
DS1701 Posted July 10, 2018 Report Share Posted July 10, 2018 refer to : https://stackoverflow.com/questions/38352801/systemc-error-with-the-library Quote Link to comment Share on other sites More sharing options...
AmeyaVS Posted July 10, 2018 Report Share Posted July 10, 2018 Hello @katang, Is there a specific reason for using SystemC 2.3.1 release? This issue has already been fixed in the SystemC 2.3.2 release as mentioned by @maehne. Best Regards, Ameya Vikram Singh Quote Link to comment Share on other sites More sharing options...
katang Posted July 10, 2018 Author Report Share Posted July 10, 2018 Thanks for all replies. In my other environments, I use 2.3.1. So I must upgrade this one or all the others. Quote Link to comment Share on other sites More sharing options...
maehne Posted July 11, 2018 Report Share Posted July 11, 2018 If it is necessary for you to stick with SystemC 2.3.1, you can simply comment out the offending line in systemc.h. The function is nowhere used inside the proof-of-concept implementation of SystemC. 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.