有项目需要在开发板上用到fltk这个轻量级的GUI开发工具,于是开始了这段艰苦之旅。虽然还有问题,但还是取得了一定的进展,应该可以在目标板跑程序了~在此留个记录,希望能够给需要的朋友们一点参考。
在编译的过程中,参考了大量网上的资料,在此说声谢谢~
http://blog.chinaunix.net/uid-20595394-id-1619435.html
http://blog.chinaunix.net/uid-20595394-id-1619427.html
http://blog.csdn.net/pafone/article/details/6307401
http://tauruspdj.blog.163.com/blog/static/4312500620080279183197/
http://comments.gmane.org/gmane.comp.lib.fltk.general/25622
http://blog.csdn.net/marlene0312/article/details/5959407
http://blog.csdn.net/crazyboy2005/article/details/4510363
其中 重点推荐 1、2、4三个链接。
编译所用的源码包: arm-linux-gcc 3.4.5.tar.gz fltk-1.3.0-source.tar.gz freetype-2.3.10.tar.gz jpegsrc.v6b.tar.gz microwindows-full-0.92.tar.gz nxlib-0.46.tar.gz
1.先按照上面第一个链接编译好microwindows(Nano-X)。中间会出现错误,基本上在网上都能找到解决的方法。
2. 按照上面第四个链接顺序做。编译好nxlib。
3.将第一步编译好的libnano-X.a 或者libnano-X.so拷贝到nxlib目录下,和libNX11.a或libNX11.so放在一起。
4.cd fltk-1.3.0,我的配置选项:./configure --host=arm-linux --prefix=/usr/local/mwinx/fltk --with-x --x-includes=/home/xxx/xxx/mwinx/nxlib --x-libraries=/home/xxx/xxx/mwinx/nxlib。然后make;主要在这一步卡住了。
错误:
Linking fluid...
../lib/libfltk.a(utf8Input.o)(.text+0xef8): In function `XUtf8LookupString':
: undefined reference to `XIMOfIC'
../lib/libfltk.a(utf8Input.o)(.text+0xf08): In function `XUtf8LookupString':
: undefined reference to `XLocaleOfIM'
解决:将utf8Input.c 中对应的代码删掉,编译。
目前最新的错误
Linking editor...
Generating fast_slow.cxx and header from fast_slow.fl...
../fluid/fluid: 1: Syntax error: word unexpected (expecting ")")
make[1]: *** [fast_slow.cxx] 错误 2
make: *** [all] 错误 1
目前还没找到解决的办法。期待高手指点。