我正在尝试在我的 Ubuntu 12.04 计算机上建立一个名为fastHOG的定向梯度直方图库。当我尝试编译现成的 fastHOG 代码时,编译器抱怨它找不到。根据Rahul Ashok 关于 fastHOG 的教程,我需要安装Fast Light Toolkit (FLTK) 2.0。该教程说 2.0 以外的 FLTK 版本不起作用。fltk/run.h
所以,我正在尝试编译 FLTK 2.0 ( svn co http://svn.easysw.com/public/fltk/fltk/trunk fltk-2.0
)。当我make
在fltk-2.0
文件夹中执行此操作时,会收到类似undefined reference to 'FcInit'
.
关于如何让 FLTK 2.0 正确编译的任何建议?
这是我在 Ubuntu 12.04 上使用 g++ 4.6.3 构建 FLTK 2.0 时得到的完整错误打印输出:
...
Linking fluid2...
../lib/libfltk2.a(Font.o):Font.cxx:function fltk::list_fonts(fltk::Font**&): error: undefined reference to 'FcInit'
../lib/libfltk2.a(Font.o):Font.cxx:function fltk::list_fonts(fltk::Font**&): error: undefined reference to 'FcPatternCreate'
../lib/libfltk2.a(Font.o):Font.cxx:function fltk::list_fonts(fltk::Font**&): error: undefined reference to 'FcObjectSetBuild'
../lib/libfltk2.a(Font.o):Font.cxx:function fltk::list_fonts(fltk::Font**&): error: undefined reference to 'FcFontList'
../lib/libfltk2.a(Font.o):Font.cxx:function fltk::list_fonts(fltk::Font**&): error: undefined reference to 'FcPatternDestroy'
../lib/libfltk2.a(Font.o):Font.cxx:function fltk::list_fonts(fltk::Font**&): error: undefined reference to 'FcPatternGetString'
../lib/libfltk2.a(Font.o):Font.cxx:function fltk::list_fonts(fltk::Font**&): error: undefined reference to 'FcFontSetDestroy'
../lib/libfltk2.a(Font.o):Font.cxx:function fltk::Font::sizes(int*&): error: undefined reference to 'FcPatternGetDouble'
../lib/libfltk2.a(Font.o):Font.cxx:function fltk::Font::sizes(int*&): error: undefined reference to 'FcFontSetDestroy'
../lib/libfltk2.a(Font.o):Font.cxx:function fltk::Font::encodings(char const**&): error: undefined reference to 'FcFontSetDestroy'
../lib/libfltk2.a(Font.o):Font.cxx:function fltk::Font::encodings(char const**&): error: undefined reference to 'FcPatternGetString' ../lib/libfltk2.a(Image.o):Image.cxx:function figure_out_visual(): error: undefined reference to 'XRenderFindStandardFormat'
../lib/libfltk2.a(Image.o):Image.cxx:function fl_xrender_draw_image(unsigned long, fltk::PixelType, fltk::Rectangle const&, fltk::Rectangle const&): error: undefined reference to 'XRenderCreatePicture'
../lib/libfltk2.a(Image.o):Image.cxx:function fl_xrender_draw_image(unsigned long, fltk::PixelType, fltk::Rectangle const&, fltk::Rectangle const&): error: undefined reference to 'XRenderSetPictureFilter'
../lib/libfltk2.a(Image.o):Image.cxx:function fl_xrender_draw_image(unsigned long, fltk::PixelType, fltk::Rectangle const&, fltk::Rectangle const&): error: undefined reference to 'XRenderSetPictureTransform'
../lib/libfltk2.a(Image.o):Image.cxx:function fl_xrender_draw_image(unsigned long, fltk::PixelType, fltk::Rectangle const&, fltk::Rectangle const&): error: undefined reference to 'XRenderComposite'
../lib/libfltk2.a(Image.o):Image.cxx:function fl_xrender_draw_image(unsigned long, fltk::PixelType, fltk::Rectangle const&, fltk::Rectangle const&): error: undefined reference to 'XRenderComposite'
../lib/libfltk2.a(Image.o):Image.cxx:function fl_xrender_draw_image(unsigned long, fltk::PixelType, fltk::Rectangle const&, fltk::Rectangle const&): error: undefined reference to 'XRenderComposite'
../lib/libfltk2.a(Image.o):Image.cxx:function fl_xrender_draw_image(unsigned long, fltk::PixelType, fltk::Rectangle const&, fltk::Rectangle const&): error: undefined reference to 'XRenderFreePicture'
collect2: ld returned 1 exit status
make[1]: *** [fluid2] Error 1
make: *** [all] Error 2