← Back to team overview

leaningtech-dev team mailing list archive

[Question #679239]: Missing c lib support for Cheerp

 

New question #679239 on Cheerp:
https://answers.launchpad.net/cheerp/+question/679239

Hi 
  I keep running into this problem:

In file included from /test.h:9:
In file included from /Applications/cheerp/bin/../include/c++/v1/functional:496:
/Applications/cheerp/bin/../include/c++/v1/memory:1820:10: error: no matching
      function for call to 'free'
        {free(__p);}
         ^~~~
/Applications/cheerp/bin/../include/c++/v1/memory:1495:14: note: in
      instantiation of member function 'std::allocator<const
      apl::StyledText::Span>::deallocate' requested here
        {__a.deallocate(__p, __n);}
             ^
/Applications/cheerp/bin/../include/c++/v1/vector:472:25: note: in instantiation
      of member function 'std::allocator_traits<std::allocator<const
      apl::StyledText::Span> >::deallocate' requested here
        __alloc_traits::deallocate(__alloc(), __begin_, capacity());
                        ^
/Applications/cheerp/bin/../include/c++/v1/vector:477:29: note: in instantiation
      of member function 'std::__vector_base<const apl::StyledText::Span,
      std::allocator<const apl::StyledText::Span> >::~__vector_base' requested
      here
class _LIBCPP_TYPE_VIS_ONLY vector
                            ^
/Applications/cheerp/bin/../include/stdlib.h:90:22: note: candidate function not
      viable: no known conversion from 'pointer' (aka 'const
      apl::StyledText::Span *') to 'void *' for 1st argument; take the address
      of the argument with &
_VOID   _EXFUN_NOTHROW(free,(_PTR));
                       ^
/Applications/cheerp/bin/../include/_ansi.h:64:37: note: expanded from macro
      '_EXFUN_NOTHROW'
#define _EXFUN_NOTHROW(name, proto)     name proto _NOTHROW
                                        ^
4 errors generated.



test.h is trying to include the following:

#include <cassert>
#include <functional>
#include <memory>
#include <vector>

Here is my cmake command : 
cmake -DCMAKE_TOOLCHAIN_FILE=/Applications/cheerp/share/cmake/Modules/CheerpToolchain.cmake -DBUILD_TESTS=ON -DCMAKE_SYSTEM_NAME=cheerp -frtti ..

Thanks

-- 
You received this question notification because your team Leaningtech
Team is an answer contact for Cheerp.