手機 - Blackberry Passport - Core Native (C/C++) - Build SDL_ttf 2.0.11



步驟如下:

$ cd
$ wget https://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.11.tar.gz
$ tar xvf SDL_ttf-2.0.11.tar.gz
$ cd SDL_ttf-2.0.11
$ source ~/bbndk/bbndk-env_10_3_1_995.sh
$ export TARGETMACH=arm-unknown-nto-qnx8.0.0eabi
$ export BUILDMACH=i686-pc-linux-gnu
$ export CROSS=arm-unknown-nto-qnx8.0.0eabi
$ export CC=${CROSS}-gcc
$ export LD=${CROSS}-ld
$ export AS=${CROSS}-as
$ export CXX=${CROSS}-g++

$ ./configure --host=$TARGETMACH --prefix=$QNX_TARGET
    configure: error:
    *** Unable to find FreeType2 library (http://www.freetype.org/)

$ vim configure +12572
    freetype_prefix=$(QNX_TARGET)/bin/freetype-config

$ make
    SDL_ttf.c:39:22: fatal error: ft2build.h: No such file or directory
    compilation terminated.

$ vim Makefile +84
    DEFAULT_INCLUDES = -I. -I$(QNX_TARGET)/usr/include/freetype2/

$ make
    ntoarm-ld: cannot find -lSDL

$ vim Makefile +154
    LIBS = $(QNX_TARGET)/lib/libSDL.so

$ vim Makefile +186
    SDL_LIBS = $(QNX_TARGET)/lib/libSDL.so

$ make
    ntoarm-ld: showfont.o: undefined reference to symbol 'libiconv_open'
    libiconv.so.1: error adding symbols: DSO missing from command line

$ vim Makefile +152
    LDFLAGS = $(QNX_TARGET)/armle-v7/usr/lib/libiconv.so.1 $(QNX_TARGET)/armle-v7/usr/lib/libfreetype.so

$ make
$ make install