Z-Pocket Game Pro(ZPG Pro)

build flac v1.2.1


步驟如下:

$ export TARGETMACH=arm-linux
$ export BUILDMACH=aarch64
$ export CROSS=arm-linux-gnueabihf-
$ export CC=${CROSS}gcc
$ export LD=${CROSS}ld
$ export AS=${CROSS}as
$ export CXX=${CROSS}g++

$ cd 
$ wget https://ftp.osuosl.org/pub/xiph/releases/flac/flac-1.2.1.tar.gz
$ tar xvf flac-1.2.1.tar.gz
$ cd flac-1.2.1
$ ./configure --prefix=/usr/arm-linux-gnueabihf --build=arm-linux-gnueabihf --host=arm-linux
$ make
  main.cpp:75:3: error: ‘memcmp’ was not declared in this scope
     memcmp(buffer, "RIFF", 4) ||
     ^~~~~~
  main.cpp:75:3: note: ‘memcmp’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
  main.cpp:35:1:
  +#include <cstring>

  main.cpp:75:3:
     memcmp(buffer, "RIFF", 4) ||
     ^~~~~~
  make[5]: *** [Makefile:420: main.o] Error 1

$ vim examples/cpp/encode/file/main.cpp +31
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
  #include "FLAC++/metadata.h"
  #include "FLAC++/encoder.h"

$ make


返回上一頁