交叉编译gd库时遇到的问题,请高手指点
我要在嵌入式系统下使用gd库,于是想用arm-unknown-linux交叉编译gd,编译过程中出现下面的问题,怎么也过去不了。我已经把freetype和jpeg都装好了。请问这个问题该如何解决?
是库没有链接上么?
/bin/sh ./libtool --mode=link /opt/host/armv4l/bin/armv4l-unknown-linux-gcc -g
-O2 -L/opt/host/armv4l/amrv4l-unknown-linux/lib -o annotate annotate.o ./libgd.la -ljpeg -lfreetype -lpng -lz -lm
/opt/host/armv4l/bin/armv4l-unknown-linux-gcc -g -O2 -o .libs/annotate annotate.o -L/opt/host/armv4l/amrv4l-unknown-linux/lib ./.libs/libgd.so -L/usr/X11R6/lib /usr/lib/libjpeg.so /usr/lib/libfreetype.so -lpng -lz -lm -Wl,--rpath -Wl,/opt/host/armv4l/armv4l-unknown-linux/lib
./.libs/libgd.so: undefined reference to `FT_Init_FreeType'
./.libs/libgd.so: undefined reference to `FT_Load_Glyph'
./.libs/libgd.so: undefined reference to `FT_Done_Face'
./.libs/libgd.so: undefined reference to `FT_Get_Kerning'
./.libs/libgd.so: undefined reference to `FT_Get_Char_Index'
./.libs/libgd.so: undefined reference to `FT_Done_Size'
./.libs/libgd.so: undefined reference to `FT_Set_Charmap'
./.libs/libgd.so: undefined reference to `FT_New_Size'
./.libs/libgd.so: undefined reference to `FT_Get_Glyph'
./.libs/libgd.so: undefined reference to `FT_Glyph_To_Bitmap'
./.libs/libgd.so: undefined reference to `FT_Attach_File'
./.libs/libgd.so: undefined reference to `FT_Done_FreeType'
./.libs/libgd.so: undefined reference to `FT_Set_Char_Size'
./.libs/libgd.so: undefined reference to `FT_Set_Transform'
./.libs/libgd.so: undefined reference to `FT_Done_Glyph'
./.libs/libgd.so: undefined reference to `FT_New_Face'
./.libs/libgd.so: undefined reference to `FT_Activate_Size'
collect2: ld returned 1 exit status
make[1]: *** [annotate] Error 1
make[1]: Leaving directory `/arm2410s/gd/gd-2.0.33-arm'
make: *** [install-recursive] Error 1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
use static
这些定义都是在freetype.h里面定义的。你把include的路径也加上 -I/.....再试试!