#include <utils/CallStack.h>
     #include<utils/Log.h>

 

android::CallStack stack;
      stack.update();
      stack.dump(1); 
      //输出到printf
      stack.log("dsfdsfds"); 
      //输出到logcat

 

 

 

: undefined reference to 'android::CallStack::CallStack()'
hardware/interfaces/light/2.0/default/Light.cpp:155: error: undefined reference to 'android::CallStack::update(int, int)'
hardware/interfaces/light/2.0/default/Light.cpp:156: error: undefined reference to 'android::CallStack::dump(int, int, char const*) const'
hardware/interfaces/light/2.0/default/Light.cpp:158: error: undefined reference to 'android::CallStack::log(char const*, android_LogPriority, char const*) const'
hardware/interfaces/light/2.0/default/Light.cpp:180: error: undefined reference to 'android::CallStack::~CallStack()'

 

 

https://stackoverflow.com/questions/55844214/trouble-with-undefined-reference-to-callstack-library

老外还是牛逼的

libutilscallstack

 

"libutils","libcutils",

以前的不好使了

得加libutilscallstack  

确实看makefile就明白了

 

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐