AshampooSystems / boden

Purely native C++ cross-platform GUI framework for Android and iOS development. https://www.boden.io
Other
1.67k stars 96 forks source link

error: 'tuple_size' when building with Android NDK r20 #7

Closed jhasse closed 5 years ago

jhasse commented 5 years ago

Building the bodendemo with the latest version of Android Studio and the NDK (r20) results in the following error:

[50/129] Building CXX object framework/ui/CMakeFiles/ui.dir/src/Button.cpp.o
FAILED: framework/ui/CMakeFiles/ui.dir/src/Button.cpp.o 
/home/hasse/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=aarch64-none-linux-android23 --gcc-toolchain=/home/hasse/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/home/hasse/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -DBDN_HAS_NLOHMANN_JSON -DBDN_SHARED_LIB=1 -DUNICODE -D_UNICODE -Dui_EXPORTS -I../../../../../../../../../framework/ui/include -Iframework/ui/include -I../../../../../../../../../framework/foundation/include -Iframework/foundation/include -I../../../../../../../../../framework/foundation/platforms/android/include -I../../../../../../../../../3rdparty/json/single_include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -frtti -fexceptions -std=c++17 -frtti -fexceptions -O0 -fno-limit-debug-info  -fPIC   -Werror -Wmost -std=gnu++17 -MD -MT framework/ui/CMakeFiles/ui.dir/src/Button.cpp.o -MF framework/ui/CMakeFiles/ui.dir/src/Button.cpp.o.d -o framework/ui/CMakeFiles/ui.dir/src/Button.cpp.o -c ../../../../../../../../../framework/ui/src/Button.cpp
In file included from ../../../../../../../../../framework/ui/src/Button.cpp:1:
In file included from ../../../../../../../../../framework/ui/include/bdn/ui/Button.h:4:
In file included from ../../../../../../../../../framework/ui/include/bdn/ui/ClickEvent.h:3:
In file included from ../../../../../../../../../framework/ui/include/bdn/ui/ViewEvent.h:3:
In file included from ../../../../../../../../../framework/ui/include/bdn/ui/View.h:3:
../../../../../../../../../3rdparty/json/single_include/nlohmann/json.hpp:1799:1: error: 'tuple_size' defined as a class template here but previously declared as a struct template [-Werror,-Wmismatched-tags]
class tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>>
^
/home/hasse/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/__tuple:25:22: note: did you mean class here?
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size;
                     ^
1 error generated.
Maddimax commented 5 years ago

I've pushed a fix for this ( https://github.com/AshampooSystems/boden/commit/4b4621dc11fe0ee3214c9702a5eea045de3740c0 )

Make sure to run git submodule update to get the new submodule commit.

Thanks for reporting!

jhasse commented 5 years ago

Works, thank you!