Multiple gcc on Mac OS X
Posted
by
snihalani
on Super User
See other posts from Super User
or by snihalani
Published on 2012-09-17T00:19:04Z
Indexed on
2012/09/17
3:41 UTC
Read the original article
Hit count: 457
I did a port install for gcc version 4.7.1 (MacPorts gcc47 4.7.1_2)
I named the executable as g+ and placed it in one my $PATH.
I use gcc 4.7.1 when I need c++11 standard. I haven't changed the original g++ so as not messup
XCode.
I am using eclipse-cdt and running the make all from the window. It's giving me:
20:12:40 **** Build of configuration Default for project 2804-hw2 ****
make all
g+ -c -Wall -std=c++11 main.cpp -o main.o
make: g+: No such file or directory
make: *** [main.o] Error 1
20:12:40 Build Finished (took 89ms)
Here is my makefile
CC=g+
CFLAGS=-c -Wall -std=c++11
LDFLAGS=
SOURCES=main.cpp Vector3D.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=exec
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $@
.cpp.o:
$(CC) $(CFLAGS) $< -o $@
clean:
rm $(EXECUTABLE) $(OBJECTS)
How do I make eclipse detect my g+?
© Super User or respective owner