|
一个简单的helloword程序,不能编译。
mdk linux自己带有gtk,我又安装了一个。
./configure --prefix=/usr
make
make install
编译运行hello word程序
gcc -o helloworld `pkg-config gtk-2.0 --cflags --libs` base.c
"`"这个符号也正确,1前面那个按键。
出现如下错误:
Package gtk-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk-2.0' found
我进行了如下操作,还是不行。
[root@localhost gtk+-2.2.4]# set PKG_CONFIG_PATH=/usr/gtk+-2.0.pc
[root@localhost gtk+-2.2.4]# export
(我把gtk+-2.0.pc拷贝到了/usr)
请各位高手指点,多谢。 |
|