A
Aarul Jain
Guest
Hello
I am trying to learn systemc. Systemc was already installed in one of
the servers and I am using Solaris 2.8 with gcc 3.3
I am trying to run example programs from the installation directory.
However when I run make i get error message
-------compiles the code and generates .o --------
----
g++ -I. -I.. -I/_TOOLS_/dist/systemc-2.0.1/sparc-sun-solaris2.8/include
-L. -L.. -L/_TOOLS_/dist/systemc-2.0.1/sparc-sun-solaris2.8/libS/gcc-3.2.2
-o run.x source.o sink.o fft.o main.o -lsystemc -lm 2>&1 | c++filt
Undefined first referenced
symbol in file
CoolLog::CoolLog[in-charge](char const*, char*,
bool)/_TOOLS_/dist/systemc-2.0.1/sparc-sun-solaris2.8/libS/gcc-3.2.2/libsystemc.a(sc_main.o)
ld: fatal: Symbol referencing errors. No output written to run.x
collect2: ld returned 1 exit status
I tried to do everything I could but it seems there is some problem in
makefiles.
Following are the makefiles I used.
Makefile
TARGET_ARCH = gccsparcOS5
CC = g++
OPT = -O3
DEBUG = -g
OTHER = -Wall
EXTRA_CFLAGS = $(OPT) $(OTHER)
# EXTRA_CFLAGS = $(DEBUG) $(OTHER)
MODULE = run
SRCS = source.cpp sink.cpp fft.cpp main.cpp
OBJS = $(SRCS:.cpp=.o)
include ../Makefile.defs
Makefile.defs
## Variable that points to SystemC installation path
SYSTEMC = /_TOOLS_/dist/systemc-2.0.1/sparc-sun-solaris2.8
INCDIR = -I. -I.. -I$(SYSTEMC)/include
LIBDIR = -L. -L.. -L$(SYSTEMC)/libS/gcc-3.2.2
LIBS = -lsystemc -lm $(EXTRA_LIBS)
EXE = $(MODULE).x
..SUFFIXES: .cc .cpp .o .x
$(EXE): $(OBJS) $(SYSTEMC)/libS/gcc-3.2.2/libsystemc.a
$(CC) $(CFLAGS) $(INCDIR) $(LIBDIR) -o $@ $(OBJS) $(LIBS) 2>&1 |
c++filt
..cpp.o:
$(CC) $(CFLAGS) $(INCDIR) -c $<
..cc.o:
$(CC) $(CFLAGS) $(INCDIR) -c $<
clean::
rm -f $(OBJS) *~ $(EXE) core
ultraclean: clean
rm -f Makefile.deps
Makefile.deps:
# $(CC) $(CFLAGS) $(INCDIR) -M $(SRCS) >> Makefile.deps
#include Makefile.deps
Please help somebody, bu mailing me a running code or suggesting any
modifications to this code.
I am trying to learn systemc. Systemc was already installed in one of
the servers and I am using Solaris 2.8 with gcc 3.3
I am trying to run example programs from the installation directory.
However when I run make i get error message
-------compiles the code and generates .o --------
----
g++ -I. -I.. -I/_TOOLS_/dist/systemc-2.0.1/sparc-sun-solaris2.8/include
-L. -L.. -L/_TOOLS_/dist/systemc-2.0.1/sparc-sun-solaris2.8/libS/gcc-3.2.2
-o run.x source.o sink.o fft.o main.o -lsystemc -lm 2>&1 | c++filt
Undefined first referenced
symbol in file
CoolLog::CoolLog[in-charge](char const*, char*,
bool)/_TOOLS_/dist/systemc-2.0.1/sparc-sun-solaris2.8/libS/gcc-3.2.2/libsystemc.a(sc_main.o)
ld: fatal: Symbol referencing errors. No output written to run.x
collect2: ld returned 1 exit status
I tried to do everything I could but it seems there is some problem in
makefiles.
Following are the makefiles I used.
Makefile
TARGET_ARCH = gccsparcOS5
CC = g++
OPT = -O3
DEBUG = -g
OTHER = -Wall
EXTRA_CFLAGS = $(OPT) $(OTHER)
# EXTRA_CFLAGS = $(DEBUG) $(OTHER)
MODULE = run
SRCS = source.cpp sink.cpp fft.cpp main.cpp
OBJS = $(SRCS:.cpp=.o)
include ../Makefile.defs
Makefile.defs
## Variable that points to SystemC installation path
SYSTEMC = /_TOOLS_/dist/systemc-2.0.1/sparc-sun-solaris2.8
INCDIR = -I. -I.. -I$(SYSTEMC)/include
LIBDIR = -L. -L.. -L$(SYSTEMC)/libS/gcc-3.2.2
LIBS = -lsystemc -lm $(EXTRA_LIBS)
EXE = $(MODULE).x
..SUFFIXES: .cc .cpp .o .x
$(EXE): $(OBJS) $(SYSTEMC)/libS/gcc-3.2.2/libsystemc.a
$(CC) $(CFLAGS) $(INCDIR) $(LIBDIR) -o $@ $(OBJS) $(LIBS) 2>&1 |
c++filt
..cpp.o:
$(CC) $(CFLAGS) $(INCDIR) -c $<
..cc.o:
$(CC) $(CFLAGS) $(INCDIR) -c $<
clean::
rm -f $(OBJS) *~ $(EXE) core
ultraclean: clean
rm -f Makefile.deps
Makefile.deps:
# $(CC) $(CFLAGS) $(INCDIR) -M $(SRCS) >> Makefile.deps
#include Makefile.deps
Please help somebody, bu mailing me a running code or suggesting any
modifications to this code.