I upgraded to 14.04 LTS and made all updates. It appears that the install includes gcc, for which the man page says to be GNU C/C++. So, I assume that a version of GNU C/C++ compiler package is installed with 14.04 LTS. I recompiled some of my c files successfully. However, when I tried to compile a C++ program via make, the error message says g++ is not found.
My simple makefile looks like this:
LDFLAGS = -lm
CFLAGS = -O3
CC = gcc
OBJS = read.o
cmp.o
read : $(OBJS) read.h
${CC} ${CFLAGS} -o $@ $(OBJS) ${LDFLAGS}
The source files are read.h, read.C and cmp.C.
Here is the error message:
:~/sbox$ make
g++ -c -o read.o read.C
make: g++: Command not found
make: *** [read.o] Error 127
:~/sbox$
Why is make/gcc looking for g++?
برچسب:
نویسنده: استخدام کار