无帝老三

无帝老三

0个粉丝

12

问答

0

专栏

0

资料

无帝老三  发布于  2016-05-30 20:13:54
采纳率 0%
12个问答
19629

【已解决】SDL配置失败

 

[i=s] 本帖最后由 goodman 于 2016-6-13 14:04 编辑 [/i]

配置freetype:成功,编译安装 配置SDL:成功,编译安装 配置SDL_tff:失败,提示信息如下, checking for freetype-config... /home/ubuntu/hisi_sdl/SDL_ttf-2.0.11/_install/bin/freetype-config ./configure: line 12645: /home/ubuntu/hisi_sdl/SDL_ttf-2.0.11/_install/bin/freetype-config: No such file or directory ./configure: line 12646: /home/ubuntu/hisi_sdl/SDL_ttf-2.0.11/_install/bin/freetype-config: No such file or directory checking for arm-linux-pkg-config... no checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for SDL... no no checking for sdl-config... no checking for SDL - version >= 1.2.4... no The sdl-config script installed by SDL could not be found If SDL was installed in PREFIX, make sure PREFIX/bin is in your path, or set the SDL_CONFIG environment variable to the full path to sdl-config. configure: error: *** SDL version 1.2.4 not found!

请大神帮忙看看,我是按照http://blog.sina.com.cn/s/blog_8795b0970101j5fo.html的方法配置的。版本号都一模一样,最后一步卡住了。

我来回答
回答71个
时间排序
认可量排序

goo635

0个粉丝

17

问答

0

专栏

2

资料

goo635 2016-05-31 15:25:20
认可0
再来一遍,把--prefix 设置好了。。。。

无帝老三

0个粉丝

12

问答

0

专栏

0

资料

无帝老三 2016-05-31 18:21:45
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=30929&ptid=11465]goo635 发表于 2016-5-31 15:25[/url]
再来一遍,把--prefix 设置好了。。。。[/quote]

您好,--prefix是指定make  install产生的inlcude和lib文件存放目录的
您的意思是不是最后配置sdl_ttf时,这个参数指定错误了吗?

无帝老三

0个粉丝

12

问答

0

专栏

0

资料

无帝老三 2016-05-31 18:26:56
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=30929&ptid=11465]goo635 发表于 2016-5-31 15:25[/url]
再来一遍,把--prefix 设置好了。。。。[/quote]

我把我的配置流程写一下,麻烦大神帮忙看下
1、配置freetype:
CC=/opt/hisi-linux-nptl/arm-hisiv100-linux/target/bin/arm-hisiv100nptl-linux-gcc ./configure --prefix=$PWD/bin --host=arm-linux
make
make install

2、配置SDL:
CC=/opt/hisi-linux-nptl/arm-hisiv100-linux/target/bin/arm-hisiv100nptl-linux-gcc CXX=/opt/hisi-linux-nptl/arm-hisiv100-linux/target/bin/arm-hisiv100nptl-linux-cpp ./configure --prefix=$PWD/bin --host=arm-linux --disable-alsa --disable-pulseaudio

make
make install

3、配置SDL_tff:
CC=/opt/hisi-linux-nptl/arm-hisiv100-linux/target/bin/arm-hisiv100nptl-linux-gcc ./configure --with-freetype-prefix=$PWD/bin --host=arm-linux
到这一步就过不去了。。。

goodman

2个粉丝

30

问答

18

专栏

17

资料

goodman 2016-05-31 21:53:24
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=30962&ptid=11465]无帝老三 发表于 2016-5-31 18:26[/url]
我把我的配置流程写一下,麻烦大神帮忙看下
1、配置freetype:
CC=/opt/hisi-linux-nptl/arm-hisiv100- ...[/quote]

3、配置SDL_tff:
CC=/opt/hisi-linux-nptl/arm-hisiv100-linux/target/bin/arm-hisiv100nptl-linux-gcc ./configure --with-freetype-prefix=$PWD/bin --host=arm-linux
到这一步就过不去了。。。

========================================
这个--with-freetype-prefix=$PWD/bin 不对,应该是 --with-freetype-prefix=(freetype的安装目录)
$PWD 是当前路径,你的freetype和sdl_ttf很明显不在一个目录

无帝老三

0个粉丝

12

问答

0

专栏

0

资料

无帝老三 2016-06-01 09:17:43
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=30970&ptid=11465]goodman 发表于 2016-5-31 21:53[/url]
3、配置SDL_tff:
CC=/opt/hisi-linux-nptl/arm-hisiv100-linux/target/bin/arm-hisiv100nptl-linux-gcc ...[/quote]

奥奥,这样的啊,您这里的提示的   freetype的安装目录应该是第一步make install 后产生的那个bin目录吗?

无帝老三

0个粉丝

12

问答

0

专栏

0

资料

无帝老三 2016-06-02 11:27:02
认可0
全部配置完之后,查看指定路径下,唯独缺少有关SDL_ttf相关的文件,哪位大神遇到过,指点下吧,make 和 make install都没有提示错误
.
├── bin
│   ├── freetype-config
│   └── sdl-config
├── include
│   ├── freetype2
│   ├── ft2build.h
│   └── SDL
├── lib
│   ├── libfreetype.a
│   ├── libfreetype.la
│   ├── libfreetype.so -> libfreetype.so.6.9.0
│   ├── libfreetype.so.6 -> libfreetype.so.6.9.0
│   ├── libfreetype.so.6.9.0
│   ├── libSDL-1.2.so.0 -> libSDL-1.2.so.0.11.4
│   ├── libSDL-1.2.so.0.11.4
│   ├── libSDL.a
│   ├── libSDL.la
│   ├── libSDLmain.a
│   ├── libSDLmain.la
│   ├── libSDL.so -> libSDL-1.2.so.0.11.4
│   └── pkgconfig
└── share
    ├── aclocal
    └── man

goodman

2个粉丝

30

问答

18

专栏

17

资料

goodman 2016-06-02 18:23:29
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=31036&ptid=11465]无帝老三 发表于 2016-6-2 11:27[/url]
全部配置完之后,查看指定路径下,唯独缺少有关SDL_ttf相关的文件,哪位大神遇到过,指点下吧,make 和 mak ...[/quote]

把你make install的日志放出来,这样没有办法知道哪里有问题了

无帝老三

0个粉丝

12

问答

0

专栏

0

资料

无帝老三 2016-06-02 18:46:26
认可0
root@ubuntu-pc:/home/ubuntu/hisi_sdl/SDL_ttf-2.0.11# make install
make[1]: Entering directory `/home/ubuntu/hisi_sdl/SDL_ttf-2.0.11'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
/bin/sh ./libtool --mode=install /usr/bin/install -c  'libSDL_ttf.la' '/usr/local/lib/libSDL_ttf.la'
libtool: install: /usr/bin/install -c .libs/libSDL_ttf-2.0.so.0.10.1 /usr/local/lib/libSDL_ttf-2.0.so.0.10.1
libtool: install: (cd /usr/local/lib && { ln -s -f libSDL_ttf-2.0.so.0.10.1 libSDL_ttf-2.0.so.0 || { rm -f libSDL_ttf-2.0.so.0 && ln -s libSDL_ttf-2.0.so.0.10.1 libSDL_ttf-2.0.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libSDL_ttf-2.0.so.0.10.1 libSDL_ttf.so || { rm -f libSDL_ttf.so && ln -s libSDL_ttf-2.0.so.0.10.1 libSDL_ttf.so; }; })
libtool: install: /usr/bin/install -c .libs/libSDL_ttf.lai /usr/local/lib/libSDL_ttf.la
libtool: install: /usr/bin/install -c .libs/libSDL_ttf.a /usr/local/lib/libSDL_ttf.a
libtool: install: chmod 644 /usr/local/lib/libSDL_ttf.a
libtool: install: ranlib /usr/local/lib/libSDL_ttf.a
libtool: finish: PATH="/opt/hisi-linux-nptl/arm-hisiv100-linux/target/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/usr/local/include/SDL" || /bin/mkdir -p "/usr/local/include/SDL"
/usr/bin/install -c -m 644 'SDL_ttf.h' '/usr/local/include/SDL/SDL_ttf.h'
test -z "/usr/local/lib/pkgconfig" || /bin/mkdir -p "/usr/local/lib/pkgconfig"
/usr/bin/install -c -m 644 'SDL_ttf.pc' '/usr/local/lib/pkgconfig/SDL_ttf.pc'
make[1]: Leaving directory `/home/ubuntu/hisi_sdl/SDL_ttf-2.0.11'

无帝老三

0个粉丝

12

问答

0

专栏

0

资料

无帝老三 2016-06-02 18:49:16
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=31064&ptid=11465]goodman 发表于 2016-6-2 18:23[/url]
把你make install的日志放出来,这样没有办法知道哪里有问题了[/quote]

Libraries have been installed in:
   /usr/local/lib

怎么会install  /usr/local/lib?

goodman

2个粉丝

30

问答

18

专栏

17

资料

goodman 2016-06-02 19:32:22
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=31067&ptid=11465]无帝老三 发表于 2016-6-2 18:49[/url]
Libraries have been installed in:
   /usr/local/lib

[/quote]

你的--prefix没有配置对,

无帝老三

0个粉丝

12

问答

0

专栏

0

资料

无帝老三 2016-06-02 20:31:21
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=31069&ptid=11465]goodman 发表于 2016-6-2 19:32[/url]
你的--prefix没有配置对,[/quote]

我重新配置了一遍,把三个文件夹全部删掉,重新解压,新建了一个文件目录/home/ubuntu/hisi_sdl/bin
在配置的时候,三个配置的--prefix都指定为上述目录,
这样做不正确吗?这一个问题搞了几天了,目前我是手动建立一个bmp在调试,

goodman

2个粉丝

30

问答

18

专栏

17

资料

goodman 2016-06-03 09:17:09
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=31072&ptid=11465]无帝老三 发表于 2016-6-2 20:31[/url]
我重新配置了一遍,把三个文件夹全部删掉,重新解压,新建了一个文件目录/home/ubuntu/hisi_sdl/bin
在 ...[/quote]

按你说的没有错,但是实际操作的时候请看日志信息,可能是目录不对或者其他错误引起的

无帝老三

0个粉丝

12

问答

0

专栏

0

资料

无帝老三 2016-06-03 09:28:27
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=31086&ptid=11465]goodman 发表于 2016-6-3 09:17[/url]
按你说的没有错,但是实际操作的时候请看日志信息,可能是目录不对或者其他错误引起的[/quote]

恩,谢谢goodman的耐心解释,我再仔细看看

无帝老三

0个粉丝

12

问答

0

专栏

0

资料

无帝老三 2016-06-03 18:58:50
认可0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking for windres... no
checking for arm-linux-windres... no
checking for linux-gnu-windres... no
checking for working alloca.h... yes
checking for alloca... yes
checking for freetype-config... /home/ubuntu/hisi_sdl/bin//bin/freetype-config
checking for arm-linux-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for SDL... no
no
checking for sdl-config... no
checking for SDL - version >= 1.2.4... no
*** The sdl-config script installed by SDL could not be found
*** If SDL was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the SDL_CONFIG environment variable to the
*** full path to sdl-config.
configure: error: *** SDL version 1.2.4 not found!


为什么checking for sdl-config... no会显示no??明明是有这个的啊

无帝老三

0个粉丝

12

问答

0

专栏

0

资料

无帝老三 2016-06-06 10:53:32
认可0
CC=/opt/hisi-linux-nptl/arm-hisiv100-linux/target/bin/arm-hisiv100nptl-linux-gcc ./configure --with-freetype-prefix=/home/ubuntu/hisi_sdl/bin/ --with-sdl-prefix=/home/ubuntu/hisi_sdl/bin/ --host=arm-linux

无帝老三

0个粉丝

12

问答

0

专栏

0

资料

无帝老三 2016-06-06 17:01:31
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=31086&ptid=11465]goodman 发表于 2016-6-3 09:17[/url]
按你说的没有错,但是实际操作的时候请看日志信息,可能是目录不对或者其他错误引起的[/quote]

您好,配置问题已经解决了,现在实现osd功能发现,生成的bmp图片太大,怎么控制生成bmp图片大小呢?
程序就是网上复制下来的
BITMAP_S SDL_OSDtoBMP(char *tmp_sys_time)  
{  
        static unsigned char Count=0;
        if (TTF_Init() < 0 )
        {  
                fprintf(stderr, "Couldn't initialize TTF: %s\n",SDL_GetError());  
                SDL_Quit();
        }  
      
        font = TTF_OpenFont("./simhei.ttf", 48);
        if ( font == NULL )
        {  
                fprintf(stderr, "Couldn't load %d pt font from %s: %s\n",  
                "ptsize", 18, SDL_GetError());  
        }  
        SDL_Color forecol=   { 0xff, 0xff, 0xff, 0xff };  
        text = TTF_RenderUTF8_Solid(font, tmp_sys_time, forecol);
      
        SDL_PixelFormat *fmt;
        fmt = (SDL_PixelFormat*)malloc(sizeof(SDL_PixelFormat));
        memset(fmt,0,sizeof(SDL_PixelFormat));
        fmt->BitsPerPixel = 16;
        fmt->BytesPerPixel = 2;
      

        //fmt->Rmask = 0xff000000;//0xff000000;//0xff000000;//0x00FF0000
//        fmt->Gmask = 0x0000ff00;//0x0000ff00;//0x0000ff00;//0x0000FF00
        //fmt->Bmask = 0x000000ff;//0x000000ff;//0x000000ff;//0x000000FF
//        fmt->Amask = 0x000000ff;//0x0000ff00;//0x0000ff00;
        fmt->colorkey = 0xffffffff;
        fmt->alpha = 0xff;

        SDL_Surface *temp = SDL_ConvertSurface(text,fmt,0);
        SDL_SaveBMP(temp, "sys_time.bmp");
      
        stBitmap.u32Width = temp->w;
        stBitmap.u32Height = temp->h;
        stBitmap.pData= temp->pixels;

        stBitmap.enPixelFormat= PIXEL_FORMAT_RGB_1555;
      
        SDL_FreeSurface(text);  
        SDL_FreeSurface(temp);
        TTF_CloseFont(font);  
        TTF_Quit();  
        return stBitmap;
}

zhuangweiye

8个粉丝

0

问答

0

专栏

0

资料

zhuangweiye 2016-06-06 17:07:06
认可0
font = TTF_OpenFont("./simhei.ttf", 48);

把48改小一点试试

uy8

0个粉丝

1

问答

0

专栏

0

资料

uy8 2016-06-07 18:47:25
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=31088&ptid=11465]无帝老三 发表于 2016-6-3 09:28[/url]
恩,谢谢goodman的耐心解释,我再仔细看看[/quote]

楼主,我最近也在配置 SDL,可是不知道该下载哪一版本的安装包,你给的那个链接不是针对hi3518的吗?那hi3516也能一样吗?

无帝老三

0个粉丝

12

问答

0

专栏

0

资料

无帝老三 2016-06-07 19:11:07
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=31223&ptid=11465]zhuangweiye 发表于 2016-6-6 17:07[/url]
font = TTF_OpenFont("./simhei.ttf", 48);

把48改小一点试试[/quote]

恩,改成16了

无帝老三

0个粉丝

12

问答

0

专栏

0

资料

无帝老三 2016-06-07 19:11:51
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=31276&ptid=11465]uy8 发表于 2016-6-7 18:47[/url]
楼主,我最近也在配置 SDL,可是不知道该下载哪一版本的安装包,你给的那个链接不是针对hi3518的吗?那hi ...[/quote]

按照那个连接给的版本进行下载就行
加载中···
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区