Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android: Fix build with NDK 26 #674

Merged
merged 1 commit into from
Nov 27, 2023
Merged

android: Fix build with NDK 26 #674

merged 1 commit into from
Nov 27, 2023

Commits on Nov 27, 2023

  1. android: Fix build with NDK 26

    While the workarounds added in
    
        commit df0b921
        Author: axxel <awagger@gmail.com>
        Date:   Thu Dec 15 20:43:48 2022 +0100
    
            android: work around limitations of c++-20 support in NDK
    
    may be necessary for NDK 25, they are no longer for NDK 26,
    and even break the build with NDK 26:
    
        C/C++: .../zxing-cpp/core/src/Generator.h:103:7: error: reference to 'default_sentinel_t' is ambiguous
        C/C++:         std::default_sentinel_t end() { return {}; }
        C/C++:              ^
        C/C++: .../Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/__iterator/default_sentinel.h:23:8: note: candidate found by name lookup is 'std::__ndk1::default_sentinel_t'
        C/C++: struct default_sentinel_t { };
        C/C++:        ^
        C/C++: .../zxing-cpp/core/src/Generator.h:15:9: note: candidate found by name lookup is 'std::default_sentinel_t'
        C/C++:         struct default_sentinel_t {};
        C/C++:                ^
        C/C++: 2 errors generated.
    
    Restrict the workaround to NDK version < 26 to fix this.
    
    Fixes: #673
    michaelweghorn committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    295b193 View commit details
    Browse the repository at this point in the history