I founded my Android phone and installed termux and clang. When I tried to compile this code:
#include <android/sensor.h>
int main(){
ASensorManager* sensorManager = ASensorManager_getInstance();
}
to access the sensors in my phone it gives a bunch of errors, such as:
undefined reference to 'llvm::Type::getIntegerBitWidth
undefined reference to 'llvm::APFloat::IEEEHalfe
I compiled it on termux using clang:
clang++ main.cpp -o main -landroid
but I canβt find the library I should link to, or if it works at all.
source
share