Android clang LLVM undefined errors

Viewed 166

I rooted 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 sensors in my phone it gives a bunch of errors like:

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 cant find the library Im supposed to link with or if this even works at all.

0 Answers
Related