Giter Site home page Giter Site logo

Build fails with Clang5.0 (C ++ 17) about rmlui HOT 8 CLOSED

 avatar commented on August 29, 2024
Build fails with Clang5.0 (C ++ 17)

from rmlui.

Comments (8)

 avatar commented on August 29, 2024

a909b18

errors

Error call to non-static member function without an object argument Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Include\RmlUi\Core\Containers\robin_hood.h 1344
Error call to non-static member function without an object argument Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Include\RmlUi\Core\Containers\robin_hood.h 1339
Error call to non-static member function without an object argument Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Include\RmlUi\Core\Containers\robin_hood.h 1269
Error call to non-static member function without an object argument Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Include\RmlUi\Core\Containers\robin_hood.h 1922
Error call to non-static member function without an object argument Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Include\RmlUi\Core\Containers\robin_hood.h 1269
Error call to non-static member function without an object argument Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Include\RmlUi\Core\Containers\robin_hood.h 1964
Error call to non-static member function without an object argument Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Include\RmlUi\Core\Containers\robin_hood.h 2021
Error cannot initialize object parameter of type 'const std::equal_toRml::Core::Character' with an expression of type 'const robin_hood::detail::Table<true, 80, Rml::Core::Character, Rml::Core::FontGlyph, robin_hood::hashRml::Core::Character, std::equal_toRml::Core::Character >' Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Include\RmlUi\Core\Containers\robin_hood.h 1339
Error cannot initialize object parameter of type 'const std::equal_toRml::Core::Character' with an expression of type 'const robin_hood::detail::Table<true, 80, Rml::Core::Character, Rml::Core::FontGlyph, robin_hood::hashRml::Core::Character, std::equal_toRml::Core::Character >' Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Include\RmlUi\Core\Containers\robin_hood.h 1344
Error implicit instantiation of undefined template 'std::hashRml::Core::Character' Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Include\RmlUi\Core\Containers\robin_hood.h 747
Error implicit instantiation of undefined template 'std::hashRml::Core::Character' Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Include\RmlUi\Core\Containers\robin_hood.h 747
Error implicit instantiation of undefined template 'std::hashRml::Core::Character' Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Include\RmlUi\Core\Containers\robin_hood.h 747
Error implicit instantiation of undefined template 'std::hashRml::Core::Character' Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Include\RmlUi\Core\Containers\robin_hood.h 747
Error implicit instantiation of undefined template 'std::hashRml::Core::Character' Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Include\RmlUi\Core\Containers\robin_hood.h 747
Error no matching member function for call to 'keyToIdx' Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Include\RmlUi\Core\Containers\robin_hood.h 1958
Error no matching member function for call to 'keyToIdx' Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Include\RmlUi\Core\Containers\robin_hood.h 2016
Error no member named 'align' in namespace 'std' Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Source\Core\Memory.h 66
Error no member named 'align' in namespace 'std' Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Source\Core\Memory.h 66
Error no member named 'operator()' in 'robin_hood::detail::WrapHash<robin_hood::hashRml::Core::Character >' Library_RmlUi (Android\01_Library\Library_RmlUi) C:\dev\c\MMDAgent-1.4\Library_RmlUi\Include\RmlUi\Core\Containers\robin_hood.h 1269

from rmlui.

 avatar commented on August 29, 2024

ndk is std::align not supported
https://stackoverflow.com/questions/27064791/stdalign-not-supported-by-g4-9

fix plan

./Include/RmlUi/Core/Types.h
namespace std { inline void* align(std::size_t alignment, std::size_t size, void*& ptr, std::size_t& space) { std::uintptr_t pn = reinterpret_cast<std::uintptr_t>(ptr); std::uintptr_t aligned = (pn + alignment - 1) & -alignment; std::size_t padding = aligned - pn; if (space < size + padding) return nullptr; space -= padding; return ptr = reinterpret_cast<void*>(aligned); } }

from rmlui.

 avatar commented on August 29, 2024

std::hash<::Rml::Core::Character> need add.

Now the build passes.

``
namespace std {
// Hash specialization for enum class types (required on some older compilers)
template <> struct hash<::Rml::Core::PropertyId> {
using utype = typename ::std::underlying_type<::Rml::Core::PropertyId>::type;
size_t operator() (const ::Rml::Core::PropertyId& t) const { ::std::hash h; return h(static_cast(t)); }
};

template <> struct hash<::Rml::Core::Character> {
using utype = typename ::std::underlying_type<::Rml::Core::Character>::type;
size_t operator() (const ::Rml::Core::Character& t) const { ::std::hash h; return h(static_cast(t)); }
};

inline void* align(std::size_t alignment, std::size_t size,
void*& ptr, std::size_t& space) {
std::uintptr_t pn = reinterpret_caststd::uintptr_t(ptr);
std::uintptr_t aligned = (pn + alignment - 1) & -alignment;
std::size_t padding = aligned - pn;
if (space < size + padding) return nullptr;
space -= padding;
return ptr = reinterpret_cast<void*>(aligned);
}
}
``

from rmlui.

viciious avatar viciious commented on August 29, 2024

Isn't gnustl_static deprecated in favor of c++_static?

from rmlui.

 avatar commented on August 29, 2024

In my project, I built using gnustl_static because c ++ _ static did not have enough functions to build.

from rmlui.

mikke89 avatar mikke89 commented on August 29, 2024

I'm unable to test this, so please let me know if it works :)

from rmlui.

 avatar commented on August 29, 2024

Build was OK.
Thank you for the fix!

from rmlui.

mikke89 avatar mikke89 commented on August 29, 2024

Great!

from rmlui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.