Search code examples
androidandroid-ndkunreal-engine4

UE4 NDK android-19 cannot locate 'log2'


I am having a problem with a run-time error that says

caused by: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1307]: 1838 cannot locate 'log2'...

The higher versions above 19 are fine, however, on devices in the version lower then 19, my game is crashed by the reason.

What I did is

I declared two definition of log2 and log2f at mygame.h

#include "CoreMinimal.h"
#define log2f(x) (logf(x)/logf(2.0f))
#define log2(x) (log(x)/log(2))

DECLARE_LOG_CATEGORY_EXTERN(LogGhost, Log, All);

But still it doesn't work.


Solution

  • The problem was fixed after UE4.16.3