I'm trying to build cURL using the Android NDK standalone toolchain, but I get this error:
tool_cb_hdr.o: In function `tool_header_cb':
tool_cb_hdr.c:(.text+0x1cc): undefined reference to `__mb_sb_limit'
tool_cb_hdr.c:(.text+0x1d0): undefined reference to `_CurrentRuneLocale'
tool_formparse.o: In function `formparse':
tool_formparse.c:(.text+0x3ec): undefined reference to `__mb_sb_limit'
tool_formparse.c:(.text+0x3f0): undefined reference to `_CurrentRuneLocale'
tool_getparam.o: In function `getparameter':
tool_getparam.c:(.text+0x171c): undefined reference to `_DefaultRuneLocale'
tool_msgs.o: In function `warnf':
tool_msgs.c:(.text+0x110): undefined reference to `_CurrentRuneLocale'
tool_msgs.c:(.text+0x118): undefined reference to `__mb_sb_limit'
tool_paramhlp.o: In function `proto2num':
tool_paramhlp.c:(.text+0x320): undefined reference to `__mb_sb_limit'
tool_paramhlp.c:(.text+0x324): undefined reference to `_CurrentRuneLocale'
tool_paramhlp.o: In function `str2num':
tool_paramhlp.c:(.text+0x388): undefined reference to `_DefaultRuneLocale'
tool_parsecfg.o: In function `parseconfig':
tool_parsecfg.c:(.text+0x3b4): undefined reference to `__mb_sb_limit'
tool_parsecfg.c:(.text+0x3b8): undefined reference to `_CurrentRuneLocale'
tool_urlglob.o: In function `glob_match_url':
tool_urlglob.c:(.text+0x23c): undefined reference to `_DefaultRuneLocale'
t ool_urlglob.o: In function `glob_word':
tool_urlglob.c:(.text+0xb30): undefined reference to `__mb_sb_limit'
tool_urlglob.c:(.text+0xb34): undefined reference to `_CurrentRuneLocale'
tool_urlglob.c:(.text+0xb40): undefined reference to `_DefaultRuneLocale'
collect2: ld returned 1 exit status
This is my environment:
export HOSTCONF=arm-eabi-linux
export NDK=$HOME/android/android-ndk-r5-crystax-2
export TOOLCHAIN=$HOME/android/toolchain
export ARCH=armv7-a
export SYSROOT=$TOOLCHAIN/sysroot
export PATH=$PATH:$TOOLCHAIN/bin:$SYSROOT/usr/local/bin
export CROSS_COMPILE=arm-linux-androideabi
export CC=${CROSS_COMPILE}-gcc
export CXX=${CROSS_COMPILE}-g++
export AR=${CROSS_COMPILE}-ar
export AS=${CROSS_COMPILE}-as
export LD=${CROSS_COMPILE}-ld
export RANLIB=${CROSS_COMPILE}-ranlib
export NM=${CROSS_COMPILE}-nm
export CFLAGS="-DANDROID -mandroid -fomit-frame-pointer --sysroot $SYSROOT -march=$ARCH -mfloat-abi=softfp -mfpu=vfp -mthumb"
export CXXFLAGS="$CFLAGS"
export LDLIBS="${NDK}/sources/crystax/libs/armeabi-v7a -lcrystax_static"
What might the issue be?
I've been trying to find existing ports of cURL to Android but they all seem to use ndk-build (as opposed to the standalone toolchain) or rely on unstable parts of the API.
Thank you.
I was able to build after I did this:
export LDFLAGS="-L${NDK}/sources/crystax/libs/armeabi-v7a -lcrystax"
Related
I am trying to compile openssl for android and facing some issues. I am following the steps given in this link.
I am using NDK version r20 and OpenSSL 1.1.1c and on a linux machine.
I am facing two issues:
(1) I am able to compile libs for “android-arm” architecture but getting the below errors while compiling sample application.
./libcrypto.so: error: undefined reference to ‘sigdelset’
./libcrypto.so: error: undefined reference to ‘sigfillset’
./libcrypto.so: error: undefined reference to ‘tcgetattr’
./libcrypto.so: error: undefined reference to ‘tcsetattr’
apps/ocsp.o:ocsp.c:function ocsp_main: error: undefined reference to ‘signal’
apps/ocsp.o:ocsp.c:function ocsp_main: error: undefined reference to ‘signal’
apps/ocsp.o:ocsp.c:function ocsp_main: error: undefined reference to ‘signal’
apps/ocsp.o:ocsp.c:function ocsp_main: error: undefined reference to ‘signal’
apps/ocsp.o:ocsp.c:function process_responder: error: undefined reference to ‘__FD_SET_chk’
apps/ocsp.o:ocsp.c:function process_responder: error: undefined reference to ‘__FD_SET_chk’
apps/s_client.o:s_client.c:function s_client_main: error: undefined reference to ‘__FD_SET_chk’
apps/s_client.o:s_client.c:function s_client_main: error: undefined reference to ‘__FD_SET_chk’
apps/s_client.o:s_client.c:function s_client_main: error: undefined reference to ‘__FD_ISSET_chk’
apps/s_client.o:s_client.c:function s_client_main: error: undefined reference to ‘__FD_ISSET_chk’
apps/s_client.o:s_client.c:function s_client_main: error: undefined reference to ‘__FD_ISSET_chk’
apps/s_client.o:s_client.c:function s_client_main: error: undefined reference to ‘__FD_ISSET_chk’
apps/speed.o:speed.c:function speed_main: error: undefined reference to ‘atof’
apps/speed.o:speed.c:function speed_main: error: undefined reference to ‘atof’
apps/speed.o:speed.c:function speed_main: error: undefined reference to ‘atof’
apps/speed.o:speed.c:function speed_main: error: undefined reference to ‘atof’
clang: error: linker command failed with exit code 1 (use -v to see invocation)
(2) I am not able to compile for any other architecture. If I change architecture to “android-arm64” (or any other), I am getting the below errors while compiling library.
crypto/aes/aesv8-armx.S:5:1: error: Unknown arch name
.arch armv8-a+crypto
^
crypto/aes/aesv8-armx.S:17:2: error: invalid instruction, did you mean: stc, stm, str, swp, tst?
stp x29,x30,[sp,#-16]!
^
crypto/aes/aesv8-armx.S:18:6: error: operand must be a register in range [r0, r15]
add x29,sp,#0
^
crypto/aes/aesv8-armx.S:19:6: error: operand must be a register in range [r0, r12] or r14
mov x3,#-1
^
I am changing the architecture by changing the “architecture=android-arm” in the “file-launcher-sh”. Do I need to modify any other variables/macros?
You built openssl for a newer API level than your app, so the library is not compatible with your app. Here's how I build openssl with r20:
$ export ANDROID_NDK=/path/to/ndk
$ export PATH=$ANDROID_NDK/toolchains/llvm/prebuilt/$HOST/bin:$PATH
$ path/to/openssl/Configure android-$ARCH -D__ANDROID_API__=$MINSDKVERSION --prefix=$INSTALLPATH --openssldir=$INSTALLPATH shared
$ make SHLIB_EXT=.so install_sw
I just had to open new putty for each new architecture.
I think somehow few of the configurations/variables exported for one architecture are not getting updated when I re-run the script with new architecture.
Add the compiler flag "no-asm" to ./Configure
./Configure no-asm no-shared android-$ARCH -D__ANDROID_API__=$MINSDKVERSION --prefix=$INSTALLPATH --openssldir=$INSTALLPATH shared
I had following error when done cross compilation for android.
Cross compiler used SDK/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi'
./libgpsd.a(libgpsd_core.o):libgpsd_core.c:function gpsd_poll: error: undefined reference to '__isfinite'
./libgpsd.a(libgpsd_core.o):libgpsd_core.c:function gpsd_poll: error: undefined reference to '__isfinite'
./libgpsd.a(libgpsd_core.o):libgpsd_core.c:function gpsd_poll: error: undefined reference to '__isfinite'
./libgpsd.a(libgpsd_core.o):libgpsd_core.c:function gpsd_poll: error: undefined reference to '__isfinite'
The function infinite() is part of C99. Add LOCAL_CFLAGS += -std=c99 to your Android.mk. See question How to set standard c99 for compile android NDK project
There have been some questions similar to mine, but it seems that their solutions don't work for me.
I'm trying to compile dumpsys source code using Android NDK. I have added a couple of lines to Android.mk to include the libraries.
The final Android.mk file looks like this:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
dumpsys.cpp
LOCAL_SHARED_LIBRARIES := \
libutils \
liblog \
libbinders
ANDROID_SRC="my android source directory"
LOCAL_C_INCLUDES := ${ANDROID_SRC}/frameworks/native/include \
${ANDROID_SRC}/system/core/include
#$(warning $(TARGET_C_INCLUDES))
LOCAL_MODULE:= dumpsys
TARGET_ARCH := arm
TARGET_ARCH_ABI := armeabi-v7a
include $(BUILD_EXECUTABLE)
when I execute ndk-build, I get the following errors:
/home/mahdi/university/androidsource/system/core/include/utils/TypeHelpers.h:144: error: undefined reference to 'android::String16::~String16()'
/home/mahdi/university/androidsource/system/core/include/utils/Vector.h:240: error: undefined reference to 'android::VectorImpl::finish_vector()'
/home/mahdi/university/androidsource/system/core/include/utils/Vector.h:241: error: undefined reference to 'android::VectorImpl::~VectorImpl()'
/home/mahdi/university/androidsource/system/core/include/utils/TypeHelpers.h:135: error: undefined reference to 'android::String16::String16()'
/home/mahdi/university/androidsource/system/core/include/utils/TypeHelpers.h:154: error: undefined reference to 'android::String16::String16(android::String16 const&)'
/home/mahdi/university/androidsource/system/core/include/utils/TypeHelpers.h:166: error: undefined reference to 'android::String16::String16(android::String16 const&)'
/home/mahdi/university/androidsource/system/core/include/utils/String16.h:178: error: undefined reference to 'strzcmp16'
/home/mahdi/university/androidsource/system/core/include/utils/StrongPointer.h:143: error: undefined reference to 'android::RefBase::decStrong(void const*) const'
jni/dumpsys.cpp:32: error: undefined reference to 'android::defaultServiceManager()'
jni/dumpsys.cpp:35: error: undefined reference to '__android_log_print'
/home/mahdi/university/androidsource/system/core/include/utils/Vector.h:224: error: undefined reference to 'android::VectorImpl::VectorImpl(unsigned int, unsigned int)'
/home/mahdi/university/androidsource/system/core/include/utils/Vector.h:224: error: undefined reference to 'android::VectorImpl::VectorImpl(unsigned int, unsigned int)'
/home/mahdi/university/androidsource/system/core/include/utils/Vector.h:245: error: undefined reference to 'android::VectorImpl::operator=(android::VectorImpl const&)'
/home/mahdi/university/androidsource/system/core/include/utils/Vector.h:378: error: undefined reference to 'android::VectorImpl::sort(int (*)(void const*, void const*))'
jni/dumpsys.cpp:49: error: undefined reference to 'android::String16::String16(char const*)'
/home/mahdi/university/androidsource/system/core/include/utils/Vector.h:338: error: undefined reference to 'android::VectorImpl::add(void const*)'
jni/dumpsys.cpp:49: error: undefined reference to 'android::String16::~String16()'
jni/dumpsys.cpp:51: error: undefined reference to 'android::String16::String16(char const*)'
/home/mahdi/university/androidsource/system/core/include/utils/Vector.h:338: error: undefined reference to 'android::VectorImpl::add(void const*)'
jni/dumpsys.cpp:51: error: undefined reference to 'android::String16::~String16()'
jni/dumpsys.cpp:53: error: undefined reference to 'android::String16::String16(char const*)'
/home/mahdi/university/androidsource/system/core/include/utils/Vector.h:338: error: undefined reference to 'android::VectorImpl::add(void const*)'
jni/dumpsys.cpp:53: error: undefined reference to 'android::String16::~String16()'
jni/dumpsys.cpp:66: error: undefined reference to 'android::operator<<(android::TextOutput&, android::String16 const&)'
jni/dumpsys.cpp:81: error: undefined reference to 'android::operator<<(android::TextOutput&, android::String16 const&)'
jni/dumpsys.cpp:89: error: undefined reference to 'android::operator<<(android::TextOutput&, android::String16 const&)'
/home/mahdi/university/androidsource/system/core/include/utils/StrongPointer.h:143: error: undefined reference to 'android::RefBase::decStrong(void const*) const'
jni/dumpsys.cpp:94: error: undefined reference to 'android::aerr'
jni/dumpsys.cpp:94: error: undefined reference to 'android::aout'
collect2: error: ld returned 1 exit status
How should I solve this issue?
Thanks in advance.
I'm working on a similar issue here.
Basically, dumpsys is an AOSP component and intended to be built with the AOSP toolchain. You will need to apply some tweaks to port it to NDK – including stuff from ${ANDROID_SRC} is the first step but not the whole story.
You've successfully included the headers and thus made the compiler happy. Now the linker is complaining because it cannot find the libraries you are linking against. The good news is that they are shared libraries, thus having the libraries around at build time isn't a strict requirement.
The NDK defines a stable API of libraries you can use, which is documented here. liblog is in that list and can be included by adding the following lines to Android.mk:
LOCAL_LDLIBS := \
-llog \
The other two libraries are not part of the stable API. This essentially means that even if your code works on a particular version of Android, it may break on any later version because the API may have changed – you might want to bear this in mind.
Since these libraries are shared, all ld does is check if they actually provide the functions you're using. This question and its accepted answer have instructions for getting rid of the related error messages:
One way is to use something like:
LOCAL_LDFLAGS := -Wl,--unresolved-symbols=ignore-all
However, this will bypass all checks – so if you try to use a function that is indeed absent from the library, ld has no chance of warning you.
The cleaner, but more work-intensive approach, is to provide stub libraries. A stub library is essentially a dummy library which defines the same symbols (functions etc.) as the "real" thing but has no implementation (functions simply return without doing anything). It's enough to make the linker happy, but the libraries are not shipped and their "real" counterparts are used at runtime.
You would need to get the source code for the two libraries, which reside in the following directories: libutils and libbinders
system/core/libutils
frameworks/native/libs/binder
Copy these two dirs into your project's jni dir. Then strip the code down:
* Edit Android.mk, removing all build targets other than BUILD_SHARED_LIBRARY.
* Edit the source code files, replacing all function bodies with a simple return. It doesn't matter what you return, as long as you get the code to compile.
Eventually you will probably need to prevent the stub libraries from getting included in your .apk (I have yet to figure out how to do that).
I have one shared library ,Which written in c build using arm-linux-androideabi-gcc compiler now i want to test my shared library so i written one sample c which call that shared library(.so) and i want to make .exe , so when i compile i got the error like this
this is my make file
TARG_OS = WIN32
BUILDTYPE = Debug
OS_BITS = 32
SRC := TestLSBioCore.c
OBJS = $(SRC:.c=.o)
OUT = ./Test.exe
OUTLIB =
INCLUDE = -I../../../../../../../android-ndk-r8b/platforms/android-8/arch-arm/usr/include -I../../include
LIBS = libLSBioCore.so
# C++ compiler flags (-g -O2 -Wall)
#CCFLAGS = -O2 -w -ansi -D_POSIX_SOURCE
CCFLAGS = -O2 -w -D_POSIX_SOURCE
DEFS = "-D __MSYS__" "-D__NBISLE__"
#LDFLAGS
CFLAGS = -nostdlib
LDFLAGS =-Wl,-rpath-link=../../../../../../../android-ndk-r8b/platforms/android-8/arch-arm/usr/lib/ -L../../../../../../../android-ndk-r8b/platforms/android-8/arch-arm/usr/lib/
LIB = -lc -lm
OBJECT = ../../../../../../../android-ndk-r8b/platforms/android-8/arch-arm/usr/lib/crtbegin_dynamic.o \
../../../../../../../android-ndk-r8b/platforms/android-8/arch-arm/usr/lib/crtend_android.o
#compiler
#CCC = mingw32-gcc
CCC = arm-linux-androideabi-gcc
#Archive
#AR = ar
#AR = /cygdrive/f/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/arm-linux-androideabi-ar
AR = arm-linux-androideabi-ar
.SUFFIXES: .c
default: dep $(OUT)
.c.o:
$(CCC) -c $(CCFLAGS) $(INCLUDE) $(DEFS) $< -o $#
$(OUT): $(OBJS)
$(CCC) -o $(OUT) $(OBJECT) $(OBJS) $(LIBS) $(CFLAGS) $(LDFLAGS) $(LIB)
#$(AR) rcs $(OUTLIB) $(OBJS)
rm -f $(OBJS)
depend: dep
dep:
# makedepend -- $(CFLAGS) -- $(INCLUDES) $(SRC)
clean:
del $(OBJS) $(OUT)
i got the following error
libLSBioCore.so: undefined reference to `__aeabi_dcmple'
libLSBioCore.so: undefined reference to `__aeabi_fadd'
libLSBioCore.so: undefined reference to `__aeabi_fcmpgt'
libLSBioCore.so: undefined reference to `__aeabi_i2f'
libLSBioCore.so: undefined reference to `__aeabi_dcmplt'
libLSBioCore.so: undefined reference to `__aeabi_ddiv'
libLSBioCore.so: undefined reference to `__aeabi_dmul'
libLSBioCore.so: undefined reference to `__aeabi_d2f'
libLSBioCore.so: undefined reference to `__aeabi_fsub'
libLSBioCore.so: undefined reference to `__aeabi_fcmpge'
libLSBioCore.so: undefined reference to `__aeabi_dadd'
libLSBioCore.so: undefined reference to `__aeabi_idiv'
libLSBioCore.so: undefined reference to `__aeabi_dcmpgt'
libLSBioCore.so: undefined reference to `__aeabi_dcmpge'
libLSBioCore.so: undefined reference to `__aeabi_dsub'
libLSBioCore.so: undefined reference to `__aeabi_f2iz'
libLSBioCore.so: undefined reference to `__aeabi_fdiv'
libLSBioCore.so: undefined reference to `__aeabi_i2d'
libLSBioCore.so: undefined reference to `__aeabi_fcmpeq'
libLSBioCore.so: undefined reference to `__aeabi_fmul'
libLSBioCore.so: undefined reference to `__aeabi_fcmplt'
libLSBioCore.so: undefined reference to `__aeabi_dcmpeq'
libLSBioCore.so: undefined reference to `__aeabi_f2uiz'
libLSBioCore.so: undefined reference to `__aeabi_d2iz'
libLSBioCore.so: undefined reference to `__aeabi_f2d'
libLSBioCore.so: undefined reference to `__aeabi_idivmod'
collect2: ld returned 1 exit status
Makefile:57: recipe for target `Test.exe' failed
i hope i gave the proper link in my make ,i can;t get what the error behind this,do anyone have idea about how to make exe using arm-linux-androideabi-gcc.
You have chosen a complicated way; note that with ndk-build you can build an executable much easier. For example, look at the test-libstdc++ NDK sample.
But using the bare make is also possible. You need more libraries though, when you set -nostdlib on your command line.
Add -lgcc. You may need more libs from toolchains/arm-linux-androideabi-4.6/prebuilt/windows/lib/gcc/arm-linux-androideabi/4.6.x-google to satisfy more references.
I have problem with running build_native.sh in android cocos2d-x project. it turns out to be some linking problem. the cpp files that I created are not compiled and so become undefined reference.
here's the error :
SoybeanServer-2:android soybeansoft$ ./build_native.sh
Using prebuilt externals
make: Entering directory `/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android'
SharedLibrary : libgame.so
./obj/local/armeabi/objs/game_shared/__/__/Classes/AppDelegate.o: In function `AppDelegate::applicationDidFinishLaunching()':
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/AppDelegate.cpp:111: undefined reference to `MainMenu::scene()'
./obj/local/armeabi/objs/game_shared/__/__/Classes/HelloWorldScene.o: In function `HelloWorld::okButtonCallback(cocos2d::CCObject*)':
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:179: undefined reference to `Logic::select()'
./obj/local/armeabi/objs/game_shared/__/__/Classes/HelloWorldScene.o: In function `HelloWorld::newQuiz()':
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:172: undefined reference to `Logic::getCurrentQuiz()'
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:173: undefined reference to `Logic::getCurrentQuiz()'
./obj/local/armeabi/objs/game_shared/__/__/Classes/HelloWorldScene.o: In function `HelloWorld::swipeRight()':
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:151: undefined reference to `Logic::nextImage()'
./obj/local/armeabi/objs/game_shared/__/__/Classes/HelloWorldScene.o: In function `HelloWorld::swipeLeft()':
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:145: undefined reference to `Logic::previousImage()'
./obj/local/armeabi/objs/game_shared/__/__/Classes/HelloWorldScene.o: In function `~HelloWorld':
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:16: undefined reference to `Logic::unregisterEventHandler()'
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:30: undefined reference to `LogicEvent::~LogicEvent()'
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:16: undefined reference to `Logic::unregisterEventHandler()'
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:30: undefined reference to `LogicEvent::~LogicEvent()'
./obj/local/armeabi/objs/game_shared/__/__/Classes/HelloWorldScene.o: In function `HelloWorld':
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:9: undefined reference to `Logic::Logic()'
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:9: undefined reference to `Logic::Logic()'
./obj/local/armeabi/objs/game_shared/__/__/Classes/HelloWorldScene.o: In function `HelloWorld::imageChanged()':
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:161: undefined reference to `Logic::getCurrentImage()'
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:162: undefined reference to `MemeImage::setImage(char const*)'
./obj/local/armeabi/objs/game_shared/__/__/Classes/HelloWorldScene.o: In function `HelloWorld::init()':
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:83: undefined reference to `MemeImage::MemeImage()'
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:90: undefined reference to `Logic::init(float)'
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:91: undefined reference to `Logic::registerEventHandler(LogicEvent*)'
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:93: undefined reference to `Logic::getCurrentQuiz()'
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:94: undefined reference to `Logic::getCurrentQuiz()'
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:96: undefined reference to `Logic::getCurrentQuiz()'
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:102: undefined reference to `Logic::getCurrentImage()'
/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android/jni/../../Classes/HelloWorldScene.cpp:103: undefined reference to `MemeImage::setImage(char const*)'
./obj/local/armeabi/objs/game_shared/__/__/Classes/HelloWorldScene.o:(.data.rel.ro+0x1d0): undefined reference to `typeinfo for LogicEvent'
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/libgame.so] Error 1
make: Leaving directory `/Users/soybeansoft/devs/cocos2d-x_1.0/MemeQuiz/android'
SoybeanServer-2:android soybeansoft$
some people say that I need to list all the cpp files i created in Android.mk file in the Classes folder. But after I look out at the Classes folder, there's no Android.mk there.
so how should I list the .cpp files now?
Update :
I know that there's android.mk file in jni folder. but even if I list all my game cpp file there , the cpp still not compiled in the build_native process. So I really have no idea how to list my cpp files.
android.mk file will be in the jni folder of the eclipse project. Look over there.