Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/230.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在windows中为android编译protobuf 2.6.1_Android_C++_Windows_Qt_Protocol Buffers - Fatal编程技术网

在windows中为android编译protobuf 2.6.1

在windows中为android编译protobuf 2.6.1,android,c++,windows,qt,protocol-buffers,Android,C++,Windows,Qt,Protocol Buffers,我正在尝试在windows中为Android编译Protobuf2.6.1。我正在使用MinGw并从下载protobuf源代码 我能够运行下面的配置脚本而不会出现问题 ./configure --host=arm-linux-androideabi --disable-shared --enable-cross-compile CC=C:/Android/android-ndk-r10/toolchain /arm-linux-androideabi-4.8/prebuilt/windows-

我正在尝试在windows中为Android编译Protobuf2.6.1。我正在使用MinGw并从下载protobuf源代码

我能够运行下面的配置脚本而不会出现问题

./configure --host=arm-linux-androideabi --disable-shared 
--enable-cross-compile CC=C:/Android/android-ndk-r10/toolchain
/arm-linux-androideabi-4.8/prebuilt/windows-x86_64/bin/arm-linux-
androideabi-gcc.exe CXX=C:/Android/android-ndk-r10/toolchains/arm-linux-
androideabi-4.8/prebuilt/windows-x86_64/bin/arm-linux-androideabi-
g++.exe LDFLAGS="-LC:/Android/android-ndk-r10/platforms/android-19/arch-
arm/usr/lib --sysroot=C:/Android/android-ndk-r10/platforms/android-
19/arch-arm" CPPFLAGS=-IC:/Android/android-ndk-r10/platforms/android-
19/arch-arm/usr/include
当我运行make命令时,将显示以下错误

$ make
C:/MinGW/msys/1.0/bin/make  all-recursive
make[1]: Entering directory 'C:/MinGW/msys/1.0/home/VENKRAJ/protobuf'
Making all in .
make[2]: Entering directory 'C:/MinGW/msys/1.0/home/VENKRAJ/protobuf'
make[2]: Nothing to be done for 'all-am'.
make[2]: Leaving directory 'C:/MinGW/msys/1.0/home/VENKRAJ/protobuf'
Making all in src
make[2]: Entering directory 'C:/MinGW/msys/1.0/home/VENKRAJ/protobuf/src'
depbase=`echo google/protobuf/compiler/main.o | sed 's|[^/]*$|.deps
/&|;s|\.o$||'
`;\
C:/Android/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt 
/windows-x86_64/bin/arm-linux-androideabi-g++.exe -DHAVE_CONFIG_H -I.  
-I..   -IC:/Android/android-ndk-r10/platforms/android-19/arch-arm/usr
/include  -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare 
-O2 -g -DNDEBUG -MT google/protobuf/compiler/main.o -MD -MP -MF 
$depbase.Tpo -c -o google/protobuf/compiler/main.o google/protobuf
/compiler/main.cc &&\mv -f $depbase.Tpo $depbase.Po
In file included from ./google/protobuf/compiler
/command_line_interface.h:41:0,from google/protobuf/compiler/main.cc:33:

./google/protobuf/stubs/common.h:40:19: fatal error: cstddef: No such 
file or directory
#include <cstddef>
               ^
compilation terminated.
Makefile:2039: recipe for target 'google/protobuf/compiler/main.o' failed
make[2]: *** [google/protobuf/compiler/main.o] Error 1
make[2]: Leaving directory 'C:/MinGW/msys/1.0/home/VENKRAJ/protobuf/src'
Makefile:700: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 'C:/MinGW/msys/1.0/home/VENKRAJ/protobuf'
Makefile:606: recipe for target 'all' failed
make: *** [all] Error 2
$make
C:/MinGW/msys/1.0/bin/make all recursive
make[1]:输入目录“C:/MinGW/msys/1.0/home/VENKRAJ/protobuf”
全力以赴。
make[2]:输入目录“C:/MinGW/msys/1.0/home/VENKRAJ/protobuf”
make[2]:对“所有am”都不做任何事情。
make[2]:离开目录“C:/MinGW/msys/1.0/home/VENKRAJ/protobuf”
在src中制作所有
make[2]:进入目录“C:/MinGW/msys/1.0/home/VENKRAJ/protobuf/src”
depbase=`echo google/protobuf/compiler/main.o|sed's |[^/]*$|.deps
/&|;s| \.o$|
`;\
C:/Android/Android-ndk-r10/toolchains/arm-linux-AndroidABI-4.8/prebuild
/windows-x86_64/bin/arm-linux-androideabi-g++.exe-DHAVE_CONFIG_H-I。
-我-IC:/Android/Android-ndk-r10/platforms/Android-19/arch-arm/usr
/include-Wall-Wwrite strings-Woverloaded virtual-Wno符号比较
-O2-g-DNDEBUG-MT google/protobuf/compiler/main.o-MD-MP-MF
$depbase.Tpo-c-oogle/protobuf/compiler/main.oogle/protobuf
/编译器/main.cc&&\mv-f$depbase.Tpo$depbase.Po
包含在文件中的./google/protobuf/compiler
/command_line_interface.h:41:0,来自google/protobuf/compiler/main.cc:33:
./google/protobuf/stubs/common.h:40:19:致命错误:cstddef:没有这样的错误
文件或目录
#包括
^
编译终止。
Makefile:2039:目标“google/protobuf/compiler/main.o”的配方失败
make[2]:***[google/protobuf/compiler/main.o]错误1
make[2]:离开目录“C:/MinGW/msys/1.0/home/VENKRAJ/protobuf/src”
Makefile:700:目标“所有递归”的配方失败
生成[1]:***[all recursive]错误1
make[1]:离开目录“C:/MinGW/msys/1.0/home/VENKRAJ/protobuf”
Makefile:606:目标“全部”的配方失败
make:**[全部]错误2
请告诉我哪里出了问题

试着跑

澄清

打扫卫生

并重新运行

/配置

制造

试着跑

澄清

打扫卫生

并重新运行

/配置

制造


我有同样的问题(但使用arm none eabi gcc/g++编译器)我有同样的问题(但使用arm none eabi gcc/g++编译器)Jonathan…我做了一个make clean,但仍然面临相同的错误。你能编译吗?Jonathan…我做了make clean,但仍然面临相同的错误。你能编译吗?