编译安装wxWidgets时出现的问题

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
jsj1986
帖子: 16
注册时间: 2009-04-11 8:48

编译安装wxWidgets时出现的问题

#1

帖子 jsj1986 » 2009-04-20 9:31

我下载的是wxWidgets-2.8.10。我按照网上提供的方法编译安装:
1、sudo apt-get install build-essential (这个作用是什么我也不清楚);
2、将下载的wxWidgets-2.8.10解压(tar zxvf wxWidgets.tar.gz);
3、$cd wxWidget-2.8.10
$./configure --with-gtk --enable-debug --prefix=/usr/local/wxWidget
4、这会运行make时出现问题,提示
make: *** 没有指明目标并且找不到 makefile。 停止。
我将wxWidgets解压出来的文件夹内容里有一个makefile.in文件,但没有makefile文件。由于我对makefile不了解,所以在这一步被卡住了,不知道该往下怎么走了,请各位帮忙,谢谢!
头像
jsj1986
帖子: 16
注册时间: 2009-04-11 8:48

Re: 编译安装wxWidgets时出现的问题

#2

帖子 jsj1986 » 2009-04-20 15:24

jinsj@ubuntu:~/software/wxWidgets-2.8.10$ ./configure
.......
configure: WARNING: system png library not found or too old, will use built-in instead
checking for jpeglib.h... no
configure: WARNING: system jpeg library not found, will use built-in instead
checking for tiffio.h... no
configure: WARNING: system tiff library not found, will use built-in instead
checking for expat.h... no
configure: WARNING: system expat library not found, will use built-in instead
checking for mspack.h... no
checking for GTK+ version...
checking for pkg-config... /usr/bin/pkg-config
checking for GTK+ - version >= 2.0.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
configure: error:
The development files for GTK+ were not found. For GTK+ 2, please
ensure that pkg-config is in the path and that gtk+-2.0.pc is
installed. For GTK+ 1.2 please check that gtk-config is in the path,
and that the version is 1.2.3 or above. Also check that the
libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
--libs' are in the LD_LIBRARY_PATH or equivalent.


jinsj@ubuntu:~/software/wxWidgets-2.8.10$ sudo make
[sudo] password for jinsj:
make: *** 没有指明目标并且找不到 makefile。 停止。
蓝色那一部分是什么意思呀?怎么解决啊?
songyuw
帖子: 5
注册时间: 2006-02-22 18:42
联系:

Re: 编译安装wxWidgets时出现的问题

#3

帖子 songyuw » 2009-04-20 20:01

sudo apt-get install libgtk2.0-dev把GTK+的开发文件装上
头像
jsj1986
帖子: 16
注册时间: 2009-04-11 8:48

Re: 编译安装wxWidgets时出现的问题

#4

帖子 jsj1986 » 2009-04-21 8:43

songyuw 写了:sudo apt-get install libgtk2.0-dev把GTK+的开发文件装上
运行以后提示如下信息:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
现在没有可用的软件包 libgtk2.0-dev,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到
可是下列的软件包取代了它:
libgtk2.0-bin
E: 软件包 libgtk2.0-dev 还没有可供安装的候选者
麻烦再指导一下吧,谢谢!!!
songyuw
帖子: 5
注册时间: 2006-02-22 18:42
联系:

Re: 编译安装wxWidgets时出现的问题

#5

帖子 songyuw » 2009-04-21 10:05

jsj1986 写了:
songyuw 写了:sudo apt-get install libgtk2.0-dev把GTK+的开发文件装上
运行以后提示如下信息:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
现在没有可用的软件包 libgtk2.0-dev,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到
可是下列的软件包取代了它:
libgtk2.0-bin
E: 软件包 libgtk2.0-dev 还没有可供安装的候选者
麻烦再指导一下吧,谢谢!!!
应该是你的source.list文件缺项,试试在Synaptic-->设置-->软件源里把所有项目都勾上
wkt
帖子: 849
注册时间: 2006-09-07 22:51
联系:

Re: 编译安装wxWidgets时出现的问题

#6

帖子 wkt » 2009-04-21 10:23

-0-$ apt-cache search libwxgtk2.8
libwxgtk2.8-0 - wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime)
libwxgtk2.8-dbg - wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)
libwxgtk2.8-dev - wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)
-0-$ apt-cache search wx2.8
wx2.8-doc - wxWidgets Cross-platform C++ GUI toolkit (documentation)
wx2.8-examples - wxWidgets Cross-platform C++ GUI toolkit (examples)
wx2.8-headers - wxWidgets Cross-platform C++ GUI toolkit (header files)
wx2.8-i18n - wxWidgets Cross-platform C++ GUI toolkit (i18n support)
头像
jsj1986
帖子: 16
注册时间: 2009-04-11 8:48

Re: 编译安装wxWidgets时出现的问题

#7

帖子 jsj1986 » 2009-04-21 11:16

wkt 写了:-0-$ apt-cache search libwxgtk2.8
libwxgtk2.8-0 - wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime)
libwxgtk2.8-dbg - wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)
libwxgtk2.8-dev - wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)
-0-$ apt-cache search wx2.8
wx2.8-doc - wxWidgets Cross-platform C++ GUI toolkit (documentation)
wx2.8-examples - wxWidgets Cross-platform C++ GUI toolkit (examples)
wx2.8-headers - wxWidgets Cross-platform C++ GUI toolkit (header files)
wx2.8-i18n - wxWidgets Cross-platform C++ GUI toolkit (i18n support)
太感谢了!! :em05
回复