安装了freetype链接库之后为什么系统还是不能找到?

软件和网站开发以及相关技术探讨
回复
Water_Chen
帖子: 1
注册时间: 2014-06-09 0:18
系统: Ubuntu14

安装了freetype链接库之后为什么系统还是不能找到?

#1

帖子 Water_Chen » 2014-06-09 0:44

//安装后的头文件
water@ubuntu:/usr/include$ cd freetype2
water@ubuntu:/usr/include/freetype2$ ls
config ftbzip2.h ftglyph.h ftmac.h ftsizes.h ftwinfnt.h
freetype.h ftcache.h ftgxval.h ftmm.h ftsnames.h ftxf86.h
ft2build.h ftcffdrv.h ftgzip.h ftmodapi.h ftstroke.h t1tables.h
ftadvanc.h ftchapters.h ftimage.h ftmoderr.h ftsynth.h ttnameid.h
ftautoh.h ftcid.h ftincrem.h ftotval.h ftsystem.h tttables.h
ftbbox.h fterrdef.h ftlcdfil.h ftoutln.h fttrigon.h tttags.h
ftbdf.h fterrors.h ftlist.h ftpfr.h ftttdrv.h ttunpat.h
ftbitmap.h ftgasp.h ftlzw.h ftrender.h fttypes.h
//运行结果是不能找到
water@ubuntu:/usr/include/freetype2$ cd ~/water/works/cproject/zh_player/
water@ubuntu:~/water/works/cproject/zh_player$ ./gcc.sh
/usr/bin/ld: cannot find -lfreetype2
collect2: error: ld returned 1 exit status
//以下是gcc.sh的内容
water@ubuntu:~/water/works/cproject/zh_player$ more gcc.sh
gcc ./src/musicList.c -c -o ./src/musicList.o
gcc ./src/control.c -c -o ./src/control.o
gcc ./src/player.c -c -o ./src/player.o
gcc ./src/musicList.o ./src/control.o ./src/player.o -o ./bin/player -lSDL -lSDL
_ttf -lfreetype2 -lz
rm ./src/*.o
#./bin/player

诚恳向前辈们求教!
头像
YeLee
论坛版主
帖子: 26406
注册时间: 2008-08-13 8:48
系统: Fundu i64
来自: 东海硇州,一双管钥。
联系:

Re: 安装了freetype链接库之后为什么系统还是不能找到?

#2

帖子 YeLee » 2014-06-09 11:01

代码: 全选

gcc ./src/*.o -o ./bin/player -lSDL -lSDL_ttf -l -lz $(pkg-config --libs freetype2)
◎当我站在道德的高度上俯视别人的时候,发现自己是多么渺小。
♥执着但不偏激,反对而不排斥,坚决捍卫矛盾体的存在方式。
★★★天气预报★★★
fcitx-yatable一个可以使用的码表输入法
[教程]几个实例攻克软件编译难关
Gentoo Development Guide
字体相关
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 安装了freetype链接库之后为什么系统还是不能找到?

#3

帖子 poloshiao » 2014-06-09 11:12

freetype2
http://freetype.sourceforge.net/download.html#stable
FreeType Jam for Win32 and Linux (libc6)
Since release 2.0.2, FreeType 2 and its demo programs can be compiled with an alternative build tool called ‘Jam’.
头像
YeLee
论坛版主
帖子: 26406
注册时间: 2008-08-13 8:48
系统: Fundu i64
来自: 东海硇州,一双管钥。
联系:

Re: 安装了freetype链接库之后为什么系统还是不能找到?

#4

帖子 YeLee » 2014-06-09 11:55

别迷信文档,除非你亲自检验过。 :em01
◎当我站在道德的高度上俯视别人的时候,发现自己是多么渺小。
♥执着但不偏激,反对而不排斥,坚决捍卫矛盾体的存在方式。
★★★天气预报★★★
fcitx-yatable一个可以使用的码表输入法
[教程]几个实例攻克软件编译难关
Gentoo Development Guide
字体相关
回复