0

I try to get gtkmm running within eclipse. This is my makefile (without the cleaning):

all : main.cpp
@export PATH+=/opt/local/bin;
@echo PATH=$(PATH);

g++ -v `pkg-config gtkmm-2.4 --cflags` \
    -O0 -g3 -Wall -S \
    -o main.o main.cpp;
g++ -v -o main.exe main.o \
    `pkg-config gtkmm-2.4 \
    --libs` ;

In the Console I get (amongst other output):

PATH=/usr/bin:/bin:/usr/sbin:/sbin
g++ -v `pkg-config gtkmm-2.4 --cflags` \
    -O0 -g3 -Wall -S \
    -o main.o main.cpp;
/bin/sh: pkg-config: command not found



I did:

ln -s /usr/bin/pkg-config /opt/local/bin/pkg-config

And when I type

/usr/bin/pkg-config

in Terminal, I get:

Must specify package names on the command line

So I assume pkg-config works in the "Terminal" ... But not in eclipse.

What can I do?
Thanks! Nils

thwbh
  • 1
  • 2
  • Ok, adding the output of `pkg-config gtkmm-2.4 --cflags` and `pkg-config gtkmm-2.4 --lib` manually instead got me rid of that error.. still, it seems like.. no.. dont do that – thwbh Apr 19 '13 at 08:32

1 Answers1

0

I don't know exactly what solved my Problem, since now, it works.
I guess it was one of the following:

  • makefile now looks like this:

    all: main.cpp
        g++ -v `pkg-config gtkmm-2.4 --cflags`-O0 -g3 -Wall -c -o main.o main.cpp;
        g++ -v -o main.exe main.o `pkg-config gtkmm-2.4 --libs`
    clean:
        rm -f main.exe main.o
    
  • I have smybolic link towards pkg-config within /bin:

    sudo ln -s /opt/local/bin/pkg-config /bin/pkg-config
    
  • I installed XQuartz

  • I updated MacPorts and all outdated ports:

    sudo port -v selfupdate
    sudo port upgrade outdated
    
thwbh
  • 1
  • 2