[英]How can I get pkg-config to work within eclipse juno (Mac OS X)?
I try to get gtkmm running within eclipse. 我试图让gtkmm在Eclipse中运行。 This is my makefile (without the cleaning):
这是我的makefile(无需清洁):
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. 因此,我假设pkg-config在“终端”中有效,但是在eclipse中不可用。
What can I do? 我能做什么?
Thanks! 谢谢! Nils
尼尔斯
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: makefile现在看起来像这样:
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: 我在/ bin中有指向pkg-config的smybolic链接:
sudo ln -s /opt/local/bin/pkg-config /bin/pkg-config
I installed XQuartz 我安装了XQuartz
I updated MacPorts and all outdated ports: 我更新了MacPorts和所有过时的端口:
sudo port -v selfupdate sudo port upgrade outdated
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.