2

I'm having a problem linking to libjpeg from the Android source. I have

LOCAL_SHARED_LIBRARIES := libjpeg

and

LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../../froyo/external/jpeg

but I still get undefined references to anything from that library. I've tried changing "LOCAL_SHARED_LIBRARIES" to "LOCAL_STATIC_LIBRARIES" but that did nothing. Any help is greatly appreciated.

4

2 回答 2

1

尝试以这种形式使用#include:

extern "C" {
#include "jpeglib.h"
}

它对我有用。

祝你好运!

于 2011-09-27T14:55:56.950 回答
0

libjpeg 不是作为 Android Froyo 上的共享库构建的。您需要将其作为静态库链接,例如:

LOCAL_STATIC_LIBRARIES := libjpeg
LOCAL_C_INCLUDES := external/jpeg
于 2011-03-07T19:30:03.273 回答