Android编译安卓源码 找不到c++头文件 | Code Bye

Android编译安卓源码 找不到c++头文件

移动开发 码拜 3年前 (2017-04-27) 1454次浏览
大哥好!
编译安卓源码的时候遇到错误,说是找不到c++的头文件,如下:

[  0% 20/13870] target thumb C++: l...ternal/libvpx/libwebm/mkvparser.cpp
FAILED: /bin/bash -c "(PWD=/proc/self/cwd  prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -I external/libvpx -I out/target/product/generic/obj/STATIC_LIBRARIES/libwebm_intermediates -I out/target/product/generic/gen/STATIC_LIBRARIES/libwebm_intermediates -I libnativehelper/include/nativehelper \$(cat out/target/product/generic/obj/STATIC_LIBRARIES/libwebm_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem hardware/ril/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem out/target/product/generic/obj/include -isystem bionic/libc/arch-arm/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-arm -isystem bionic/libm/include -isystem bionic/libm/include/arm -c    -fno-exceptions -Wno-multichar -msoft-float -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -fdebug-prefix-map=/proc/self/cwd= -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -DNDEBUG -g -Wstrict-aliasing=2 -DNDEBUG -UDEBUG  -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -nostdlibinc  -target arm-linux-androideabi    -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin    -fvisibility-inlines-hidden -Wsign-promo  -Wno-inconsistent-missing-override -nostdlibinc  -target arm-linux-androideabi   -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing  -fno-rtti -fPIC -D_USING_LIBCXX -std=gnu++14  -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast  -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type    -MD -MF out/target/product/generic/obj/STATIC_LIBRARIES/libwebm_intermediates/libwebm/mkvparser.d -o out/target/product/generic/obj/STATIC_LIBRARIES/libwebm_intermediates/libwebm/mkvparser.o external/libvpx/libwebm/mkvparser.cpp) && (cp out/target/product/generic/obj/STATIC_LIBRARIES/libwebm_intermediates/libwebm/mkvparser.d out/target/product/generic/obj/STATIC_LIBRARIES/libwebm_intermediates/libwebm/mkvparser.P; sed -e "s/#.*//" -e "s/^[^:]*: *//" -e "s/ *\\$//" -e "/^\$/ d" -e "s/\$/ :/" < out/target/product/generic/obj/STATIC_LIBRARIES/libwebm_intermediates/libwebm/mkvparser.d >> out/target/product/generic/obj/STATIC_LIBRARIES/libwebm_intermediates/libwebm/mkvparser.P; rm -f out/target/product/generic/obj/STATIC_LIBRARIES/libwebm_intermediates/libwebm/mkvparser.d)"
In file included from external/libvpx/libwebm/mkvparser.cpp:9:
external/libvpx/libwebm/mkvparser.hpp:12:10: fatal error: "cstddef" file not found
#include <cstddef>
         ^
1 error generated.
[  0% 20/13870] Ensure Jack server is installed and started
Jack server already installed in "/home/king/.jack-server"
Server is already running
[  0% 20/13870] host C++: bcc_strip...s/bcc_strip_attr/bcc_strip_attr.cpp
ninja: build stopped: subcommand failed.
make: *** [ninja_wrapper] Error 1

请大哥指导!谢谢!

解决方案

40

应该是原因是系统没安装libvpx这个库

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明Android编译安卓源码 找不到c++头文件
喜欢 (0)
[1034331897@qq.com]
分享 (0)