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

Error on Android compilation #1527

Closed
Bizyroth opened this issue Apr 23, 2020 · 1 comment
Closed

Error on Android compilation #1527

Bizyroth opened this issue Apr 23, 2020 · 1 comment

Comments

@Bizyroth
Copy link

Hello
I'm trying to compile spdlog for Android but i'm facing multiple error:

  • spdlog/include/spdlog/pattern_formatter.h:83:95: error: converting to 'spdlog::pattern_formatter::custom_flags {aka std::unordered_map<char, std::unique_ptr<spdlog::custom_flag_formatter> >}' from initializer list would use explicit constructor 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Key = char; _Tp = std::unique_ptr<spdlog::custom_flag_formatter>; _Hash = std::hash<char>; _Pred = std::equal_to<char>; _Alloc = std::allocator<std::pair<const char, std::unique_ptr<spdlog::custom_flag_formatter> > >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<char>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<char>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const char, std::unique_ptr<spdlog::custom_flag_formatter> > >]' std::string eol = spdlog::details::os::default_eol, custom_flags custom_user_flags = {});

  • include/spdlog/common.h:238:65: error: converting to 'spdlog::pattern_formatter::custom_flags {aka std::unordered_map<char, std::unique_ptr<spdlog::custom_flag_formatter> >}' from initializer list would use explicit constructor 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Key = char; _Tp = std::unique_ptr<spdlog::custom_flag_formatter>; _Hash = std::hash<char>; _Pred = std::equal_to<char>; _Alloc = std::allocator<std::pair<const char, std::unique_ptr<spdlog::custom_flag_formatter> > >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<char>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<char>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const char, std::unique_ptr<spdlog::custom_flag_formatter> > >]' return std::unique_ptr<T>(new T(std::forward<Args>(args)...));

  • include/spdlog/sinks/ansicolor_sink-inl.h:79:16: error: converting to 'spdlog::pattern_formatter::custom_flags {aka std::unordered_map<char, std::unique_ptr<spdlog::custom_flag_formatter> >}' from initializer list would use explicit constructor 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Key = char; _Tp = std::unique_ptr<spdlog::custom_flag_formatter>; _Hash = std::hash<char>; _Pred = std::equal_to<char>; _Alloc = std::allocator<std::pair<const char, std::unique_ptr<spdlog::custom_flag_formatter> > >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<char>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<char>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const char, std::unique_ptr<spdlog::custom_flag_formatter> > >]' formatter_ = std::unique_ptr<spdlog::formatter>(new pattern_formatter(pattern));

The same code compiles well on linux

@gabime
Copy link
Owner

gabime commented Apr 25, 2020

How do you compile and which ndk version are you using?

I can't reproduce with ndk 21.1.6352462

@gabime gabime closed this as completed in f3b55fc Apr 25, 2020
@gabime gabime reopened this Apr 25, 2020
@gabime gabime closed this as completed in 42c4662 Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants