SFML community forums

Help => General => Topic started by: Kori on January 26, 2016, 10:09:06 pm

Title: android build c++11 features
Post by: Kori on January 26, 2016, 10:09:06 pm
Working on android port of sfml i find two problems:

1. Why i have't function like std::bind (only bind1st) ot std::make_unique (make_shared is present).
2. Trying to implement SceneGraph structure from SFML Game Development book - unique pointer polymorphism:
class Base;
class Derived : public Base;
 
std::unique_ptr<Derived> der (new Derived);
 
std::unique_ptr<Base> bas (new Base);
 
 
bas = std::move(der);  
 
-- Works
 
void foo ( std::unique_ptr<Base> ptr);
 
foo(std::move(der));
 
-- this giving me error!
Title: Re: android build c++11 features
Post by: zsbzsb on January 26, 2016, 10:19:47 pm
This has nothing to do with the android port of SFML. You need a compiler that supports C++11 and you may need to add a compiler flag to enable that support.
Title: Re: android build c++11 features
Post by: Kori on January 26, 2016, 10:23:04 pm
I know that this is compiler issue, but i am using an android example. I don't really know at all how to change compiler on NDK or change default std/stl implementation on my own.