1.生成Makefile
./genMakefiles openwrt
config.openwrt 内容如下:
CROSS_COMPILE= mipsel-openwrt-linux-
COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
C = c
C_COMPILER = $(CROSS_COMPILE)gcc
C_FLAGS = $(COMPILE_OPTS)
CPP = cpp
CPLUSPLUS_COMPILER = $(CROSS_COMPILE)g++
CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 <span style="color:#ff0000;">-DLOCALE_NOT_USED</span>
OBJ = o
LINK = $(CROSS_COMPILE)g++ -o
LINK_OPTS =
CONSOLE_LINK_OPTS = $(LINK_OPTS)
LIBRARY_LINK = $(CROSS_COMPILE)ar cr
LIBRARY_LINK_OPTS = $(LINK_OPTS)
LIB_SUFFIX = a
LIBS_FOR_CONSOLE_APPLICATION =
LIBS_FOR_GUI_APPLICATION =
EXE =
2.make
3.注意事项
如果-DLOCALE_NOT_USED 不加
会报如下错误:
In file included from MPEG4GenericRTPSink.cpp:22:0:
include/Locale.hh:47:123: fatal error: xlocale.h: No such file or directory
#include <xlocale.h> // because, on some systems, <locale.h> doesn't include <xlocale.h>; this makes sure that we get both
^
compilation terminated.
make[1]: *** [MPEG4GenericRTPSink.o] 错误 1