Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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++-mp-4.7
CFLAGS=-c -Wall -std=c++11
LDFLAGS=
SOURCES=main.cpp Vector3D.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=exec
PATH := ${PATH}:/opt/local/bin/

all: $(SOURCES) $(EXECUTABLE)
    echo ${PATH}
$(EXECUTABLE): $(OBJECTS) 
    $(CC) $(LDFLAGS) $(OBJECTS) -o $@
.cpp.o:
    $(CC) $(CFLAGS) $< -o $@
 clean:
    rm $(EXECUTABLE) $(OBJECTS)

How do I make eclipse detect my g+?

share|improve this question
    
Put something like echo ${PATH} in there and see if it got your path. If not, add a PATH += ... line to your makefile. – David Schwartz Sep 17 '12 at 4:54
    
I added the path, it's still not able to find it. – snihalani Sep 17 '12 at 14:27
up vote 0 down vote accepted

I made a link to g++-mp-4.7 in my /usr/bin. You can't seem to append to the path in Eclipse's make. It didn't work. Making a link works.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .