linux sdl 字体,linux 下安装 SDL_ttf 包 错误解决

在linux下安装SDL的扩展库SDL_ttf时出现了如下错误:

checking for sdl-config... /usr/bin/sdl-config

checking for SDL - version >= 1.2.4... no

*** Could not run SDL 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 SDL was incorrectly installed

*** or that you have moved SDL since it was installed. In the latter case, you

*** may want to edit the sdl-config script: /usr/bin/sdl-config

configure: error: *** SDL version 1.2.4 not found!

提示SDL包的安装版本要>=1.2.4

打开makefile在203行有SDL_VERSION = 1.2.4把1.2.4改成安装的版本(我安装的SDL的版本是1.2.14)1.2.14 保存后重新进行configure时出现

checking for sdl-config... /usr/bin/sdl-config

checking for SDL - version >= 1.2.14... no

*** Could not run SDL 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 SDL was incorrectly installed

*** or that you have moved SDL since it was installed. In the latter case, you

*** may want to edit the sdl-config script: /usr/bin/sdl-config

configure: error: *** SDL version 1.2.14 not found!

到这是否能想到不是版本的问题呢!!

打开SDL_ttf包下面的READMNE文件 内容如下:

This library is a wrapper around the excellent FreeType 2.0 library,

available at:

http://www.freetype.org/

This library allows you to use TrueType fonts to render text in SDL

applications.

To make the library, first install the FreeType library, then type

'./configure' then 'make' to build the SDL truetype library and the

showfont and glfont example applications.

Be careful when including fonts with your application, as many of them

are copyrighted.  The Microsoft fonts, for example, are not freely

redistributable and even the free "web" fonts they provide are only

redistributable in their special executable installer form (May 1998).

There are plenty of freeware and shareware fonts available on the Internet

though, and may suit your purposes.

This library is available under the GNU Library General Public License,

see the file "COPYING" for details.

Enjoy!

-Sam Lantinga   (6/20/2001)

在第一段和第三段都有告诉我们,安装SDL_ttf包前先安装FreeType包,我安装 的libfreetype包(版本不同)吗,安装完后,

继续安装SDL_ttf,configure后出现

checking for sdl-config... /usr/bin/sdl-config

checking for SDL - version >= 1.2.4... yes

checking for X... libraries , headers

checking for gethostbyname... yes

checking for connect... yes

checking for remove... yes

checking for shmat... yes

checking for IceConnectionNumber in -lICE... yes

checking for OpenGL support... yes

configure: creating ./config.status

config.status: creating Makefile

config.status: creating SDL_ttf.spec

config.status: creating SDL_ttf.pc

config.status: executing libtool commands

config.status: executing depfiles commands

编译通过!!

注:在linux下安装包时,打开安装包下面的文件README 或者INSTALL 阅读一下安装步骤,会少走很多弯路!!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值