Update your makefiles to include the -fpermissive flag, like so:
SYSTEMC=/usr/local/systemc LDFLAGS= -L$(SYSTEMC)/lib-linux -lsystemc CXXFLAGS=-Wno-deprecated -I$(SYSTEMC)/include -fpermissive all: g++ $(CXXFLAGS) *.cpp $(LDFLAGS) ./a.out
You may need to recompile the SystemC library, which case the flag must be added to the configure command:
$ sudo ../configure --prefix=/usr/local/systemc CPPFLAGS=-fpermissive
By giving the syntax above, I also managed to get SystemC running in Fedora. Goodbye Ubuntu!
Using linux 64 bits also gives you some problems. If you get the following error code:
ReplyDelete/usr/bin/ld: cannot find -lsystemc
collect2: ld returned 1 exit status
you need to use:
g++ -I. -I$SYSTEMC/include -L. -L$SYSTEMC/lib-linux64 -o OUTFILE INPUT.cpp -lsystemc -lm
Thanks for the tip, although I don't use linux 64 bits. Not yet, anyway.
ReplyDelete