davidepatti / noxim

Network on Chip Simulator
216 stars 116 forks source link

Depreciation of std::gets #19

Closed tblah closed 7 years ago

tblah commented 7 years ago

When compiling noxim using the included script, I encountered an error because GCC could not find std::gets (which is used included from systemc.h).

It seems that std::gets is no longer part of C++ since C++14 (see http://en.cppreference.com/w/cpp/io/c/gets), so I presume that my gcc version (6.2.0-5ubuntu12) was defaulting to this newer standard.

I was able to fix the build by forcing gcc to use C++11 (which included std::gets). I did this by modifying noxim's Makefile OPTS variable so as to use the option --std=c++11 in addition to what was already there. I have not checked whether versions of systemc newer than the one used by the installation script fix this issue.

davidepatti commented 7 years ago

Thank you for reporting this issue. We are investigating if it is more convenient to set the c++11 flag as default or just put a comment in the makefile.

davidepatti commented 7 years ago

Forced C+11 standard as default.