Android clang LLVM undefined errors

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.

+4
source share

Source: https://habr.com/ru/post/1680754/


All Articles