Android NDK C++ error : 'memmove' was not declared in this scope

Viewed 319

In android ndk c++ in visual studio, I'm trying to use memmove.

The compiler throws:

error : 'memmove' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation

I include string.h so, I don't get what I am missing here... I inspected the string.h and found that the definition of memmove in string.h in the ndk is inside a preprocessor block

#if defined(__BIONIC_FORTIFY)

And is undefined.

I don't know what is this preprocessor and why it is preventing the memmove from being defined.

What is this __BIONIC_FORTIFY thing? is it safe to define? Is there a problem using memmove in android?

My research : this preprocessor is defined by

#define _FORTIFY_SOURCE

but adding this to my build does not get rid of the error.

0 Answers
Related