12Jan/111
Error during SystemC compilation
I'm using Linux Mint 10 / Ubuntu 10.10 and I was getting an error during SystemC compilation. The error was:
make[3]: Entering directory `/home/sergio/a/systemc-2.2.0/src/sysc/utils' g++ -I. -I. -I. -I../../../src -Wall -DSC_INCLUDE_FX -O3 -c -o sc_utils_ids.o `test -f 'sc_utils_ids.cpp' || echo './'`sc_utils_ids.cpp sc_utils_ids.cpp: In function ‘int sc_core::initialize()’: sc_utils_ids.cpp:110: error: ‘getenv’ is not a member of ‘std’ sc_utils_ids.cpp:111: error: ‘strcmp’ was not declared in this scope sc_utils_ids.cpp: At global scope: sc_utils_ids.cpp:119: warning: ‘sc_core::forty_two’ defined but not used make[3]: *** [sc_utils_ids.o] Error 1 make[3]: Leaving directory `/home/sergio/a/systemc-2.2.0/src/sysc/utils' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/sergio/a/systemc-2.2.0/src/sysc' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/sergio/a/systemc-2.2.0/src' make: *** [all-recursive] Error 1
I found a solution at Fedora Forum (thanks to YamlaJ user).
Edit systemc-2.2.0/src/sysc/utils/sc_utils_ids.cpp file adding these two includes:
#include "string.h" #include "cstdlib"
Now you can proceed with make ; make install and test with:
cd examples/sysc/rsa make check
December 22nd, 2011 - 12:39
it worked. Thanks!