最新版3.2 编译cpp-test的时候报这个错误。。

D:\cocos2d-x-3.2\build…/cocos/./3d/CCBundleReader.cpp:94:23: error: return type of out-of-line definition of ‘cocos2d::BundleReader::tell’ differs from that in the declaration

ssize_t BundleReader::tell()
^
D:\cocos2d-x-3.2\build…/cocos/./3d/CCBundleReader.h:90:14: note: previous declaration is here
long int tell();
^
1 error generated.
make.exe: *** Error 1
make.exe: *** Waiting for unfinished jobs…
make.exe: Leaving directory `D:/cocos2d-x-3.2/tests/cpp-tests/proj.android’
Build dynamic library for project D:\cocos2d-x-3.2\build…\tests/cpp-tests/proj.android ] fails!

请问该怎么整?

我在生成apk包时也遇到同样问题,有没有人可以解决呢?

http://discuss.cocos2d-x.org/t/the-3-2-build-have-error-in-ccbundlereader-cpp/15692

你好,用你提供的方法,之前遇到的问题,已经解决,但是再次编译时,还是遇到了新问题:

Android NDK: WARNING:E:\cocos\Test\frameworks\runtime-src\proj.android…/…/cocos2d-x/cocos//./Android.mk:cocos2dx_static: LOCAL_LDLIBS is always ignored for static libraries
Android NDK: WARNING:E:\cocos\Test\frameworks\runtime-src\proj.android…/…/cocos2d-x/cocos//platform/android/Android.mk:cocos2dxandroid_static: LOCAL_LDLIBS is always ignored for static libraries
make.exe: Entering directory E:/cocos/Test/frameworks/runtime-src/proj.android' StaticLibrary : liblua.a StaticLibrary : libnetwork.a StaticLibrary : libcocosbuilder.a StaticLibrary : libcocostudio.a StaticLibrary : libspine.a StaticLibrary : libui.a StaticLibrary : libextension.a StaticLibrary : libcocos2d.a StaticLibrary : libcocosdenshion.a StaticLibrary : libbox2d.a StaticLibrary : libchipmunk.a StaticLibrary : libcocos2dandroid.a StaticLibrary : libcpufeatures.a SharedLibrary : libcocos2dlua.so E:/TDDOWNLOAD/android-ndk32-r10-windows-x86/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/windows/lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin\ld.exe: error: E:/TDDOWNLOAD/android-ndk32-r10-windows-x86/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/windows/lib/gcc/arm-linux-androideabi/4.8/libgcc.a(pr-support.o): multiple definition of '_Unwind_GetRegionStart' E:/TDDOWNLOAD/android-ndk32-r10-windows-x86/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/windows/lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin\ld.exe: E:/TDDOWNLOAD/android-ndk32-r10-windows-x86/android-ndk-r10/sources/cxx-stl/llvm-libc++/libs/armeabi/thumb/libc++_static.a(Unwind-EHABI.o): previous definition here E:/TDDOWNLOAD/android-ndk32-r10-windows-x86/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/windows/lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin\ld.exe: error: E:/TDDOWNLOAD/android-ndk32-r10-windows-x86/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/windows/lib/gcc/arm-linux-androideabi/4.8/libgcc.a(pr-support.o): multiple definition of '_Unwind_GetLanguageSpecificData' E:/TDDOWNLOAD/android-ndk32-r10-windows-x86/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/windows/lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin\ld.exe: E:/TDDOWNLOAD/android-ndk32-r10-windows-x86/android-ndk-r10/sources/cxx-stl/llvm-libc++/libs/armeabi/thumb/libc++_static.a(Unwind-EHABI.o): previous definition here clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation) make.exe: *** Error 1 make.exe: Leaving directory E:/cocos/Test/frameworks/runtime-src/proj.android’
Running command: compile
Building mode: debug
building native
NDK build mode: release
The Selected NDK toolchain version was 4.8 !
running: ‘E:\TDDOWNLOAD\android-ndk32-r10-windows-x86\android-ndk-r10\ndk-build -C E:\cocos\Test\frameworks\runtime-src\proj.android -j1 NDK_MODULE_PATH=E:\cocos\Test\frameworks\runtime-src\proj.android…/…/cocos2d-x;E:\cocos\Test\frameworks\runtime-src\proj.android…/…/cocos2d-x/cocos/;E:\cocos\Test\frameworks\runtime-src\proj.android…/…/cocos2d-x/external;E:\cocos\Test\frameworks\runtime-src\proj.android…/…/cocos2d-x/cocos/scripting’

Error running command, return code: 2

请问这个问题应该如何处理。
我是这方面的新手,请多指教,谢谢。

切换NDK r9进行编译。r10编译有问题,正在修复中。

升级3.2后,我也遇到了这个错误,昨天还遇到Couldn’t find the gcc toolchain.

为什么我用r9d也会抱着个错 我用的 引擎也是 3.2的

thanks, it work