fugu
06-14-2010, 10:44 AM
Hi there,
I am experiencing difficulties with the NR makefile. The first lines of the output of the make command look like
gcc -I/usr/local/src/nr/recipes_cpp/utils -I. -o xairy.out -lm
xairy.o: In function `main':
xairy.cpp:(.text+0x2b): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string()'
and many more undefined reference errors. I am new to make but I take it there is a problem with the linking?!
The head of my makefile is:
.SUFFIXES:
.SUFFIXES: .reslt .res .out .o .cpp
# Set the path and parameters below to the correct values when needed
NRROOT= /usr/local/src/nr/recipes_cpp
VPATH=$(NRROOT)/demo/src:$(NRROOT)/recipes:$(NRROOT)/utils:$(NRROOT)/demo/responses
CC=gcc
CFLAGS= -I$(NRROOT)/utils -I.
NRDIFF=$(NRROOT)/utils/nrdiff.pl
NRANS=$(NRROOT)/demo/answers
NRDAT=$(NRROOT)/demo/data
daniel@t400s:/usr/local/src/nr/recipes_cpp$ head -n20 makefile
.SUFFIXES:
.SUFFIXES: .reslt .res .out .o .cpp
# Set the path and parameters below to the correct values when needed
NRROOT= /usr/local/src/nr/recipes_cpp
VPATH=$(NRROOT)/demo/src:$(NRROOT)/recipes:$(NRROOT)/utils:$(NRROOT)/demo/responses
CC=gcc
CFLAGS= -I$(NRROOT)/utils -I.
NRDIFF=$(NRROOT)/utils/nrdiff.pl
NRANS=$(NRROOT)/demo/answers
NRDAT=$(NRROOT)/demo/data
NRLIBS=-lm
.cpp.o: ; $(CC) $(CFLAGS) -c $<
.o.out: ; $(CC) $(CFLAGS) -o $@ $^ $(NRLIBS)
Can anybody possibly identify the error or would you need further information?
Many thanks,
Daniel
I am experiencing difficulties with the NR makefile. The first lines of the output of the make command look like
gcc -I/usr/local/src/nr/recipes_cpp/utils -I. -o xairy.out -lm
xairy.o: In function `main':
xairy.cpp:(.text+0x2b): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string()'
and many more undefined reference errors. I am new to make but I take it there is a problem with the linking?!
The head of my makefile is:
.SUFFIXES:
.SUFFIXES: .reslt .res .out .o .cpp
# Set the path and parameters below to the correct values when needed
NRROOT= /usr/local/src/nr/recipes_cpp
VPATH=$(NRROOT)/demo/src:$(NRROOT)/recipes:$(NRROOT)/utils:$(NRROOT)/demo/responses
CC=gcc
CFLAGS= -I$(NRROOT)/utils -I.
NRDIFF=$(NRROOT)/utils/nrdiff.pl
NRANS=$(NRROOT)/demo/answers
NRDAT=$(NRROOT)/demo/data
daniel@t400s:/usr/local/src/nr/recipes_cpp$ head -n20 makefile
.SUFFIXES:
.SUFFIXES: .reslt .res .out .o .cpp
# Set the path and parameters below to the correct values when needed
NRROOT= /usr/local/src/nr/recipes_cpp
VPATH=$(NRROOT)/demo/src:$(NRROOT)/recipes:$(NRROOT)/utils:$(NRROOT)/demo/responses
CC=gcc
CFLAGS= -I$(NRROOT)/utils -I.
NRDIFF=$(NRROOT)/utils/nrdiff.pl
NRANS=$(NRROOT)/demo/answers
NRDAT=$(NRROOT)/demo/data
NRLIBS=-lm
.cpp.o: ; $(CC) $(CFLAGS) -c $<
.o.out: ; $(CC) $(CFLAGS) -o $@ $^ $(NRLIBS)
Can anybody possibly identify the error or would you need further information?
Many thanks,
Daniel