繁体   English   中英

Android NDK分析:错误:对“ monstartup”的未定义引用

[英]Android ndk profiling: error: undefined reference to 'monstartup'

我正在尝试在Eclipse中分析混合的C / C ++ android项目。 我正在按照这里的说明进行操作。

我将android-ndk-profiler-v3.2.zip解压缩为“ c:\\ android_profiler \\”,即我们有一个目录“ c:\\ android_profiler \\ android-ndk-profiler \\”,其中包含prof.h,android.mk和两个子目录armeabi和armeabi-v7a。

我在C ++源代码的开头添加了#include "c:\\android_profiler\\android-ndk-profiler\\prof.h" ,并添加了对monstartup()和moncleanup()的调用。 当我尝试构建项目时, error: undefined reference to 'monstartup'我的“问题”选项卡中出现了error: undefined reference to 'monstartup' 在线查看,共识是此错误是由于我的项目android.mk中的LOCAL_STATIC_LIBRARIES设置不正确而导致的链接失败,但是我尝试了所有我能想到的变化,包括以下内容(一次尝试一次),但他们都没有解决错误。 还有其他想法吗?

LOCAL_STATIC_LIBRARIES := c:/android_profiler/android-ndk-profiler
LOCAL_STATIC_LIBRARIES := c:/android_profiler/android-ndk-profiler/armeabi-v7a/libandroid-ndk-profiler.a
LOCAL_STATIC_LIBRARIES := c:\android_profiler\android-ndk-profiler
LOCAL_STATIC_LIBRARIES := android-ndk-profiler
LOCAL_STATIC_LIBRARIES := android_profiler
LOCAL_STATIC_LIBRARIES := c:/android_profiler
LOCAL_STATIC_LIBRARIES := c:\android_profiler

解决了,

似乎这只是android.mk中LOCAL_STATIC_LIBRARIES := android-ndk-profiler行的位置。 我将其移至文件中的下一个位置,嘿,很方便-一切正常。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM