How to compile FFmpeg with libx265 for Android? - android

I have compiled FFmpeg with libx264(as static library) for Android successfully. But I want to use libx265(as static library) in FFmpeg on Android, too. So I have made some attempts:
First, I fixed libx265's log2 function and posix_memalign function not found problems by changing them into log(use log to approximate log2) function and memalign(to replace posix_memalign and do some adjustments) function. And fixed the pthread-linking problem by removing "-lpthread" in the cmakelist.txt file.
Then, I used cmake and make to compile libx265(as static library) successfully.
I enabled libx265 while FFmpeg configure. But when the configure ran, it showed "libx265 not found using pkg-config" on the screen.
I checked the config.log, and found these error message:
/home/user/ffmpeg-2.8.1/android/arm/lib/libx265.a(bitstream.cpp.o):bitstream.cpp:typeinfo for x265::BitInterface: error: undefined reference to 'vtable for __cxxabiv1::__class_type_info'
/home/user/ffmpeg-2.8.1/android/arm/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/user/ffmpeg-2.8.1/android/arm/lib/libx265.a(bitstream.cpp.o):bitstream.cpp:typeinfo for x265::Bitstream: error: undefined reference to 'vtable for __cxxabiv1::__si_class_type_info'
/home/user/ffmpeg-2.8.1/android/arm/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/user/ffmpeg-2.8.1/android/arm/lib/libx265.a(encoder.cpp.o):encoder.cpp:typeinfo for x265::SEIDecodedPictureHash: error: undefined reference to 'vtable for __cxxabiv1::__si_class_type_info'
/home/user/ffmpeg-2.8.1/android/arm/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/user/ffmpeg-2.8.1/android/arm/lib/libx265.a(encoder.cpp.o):encoder.cpp:typeinfo for x265::SEIuserDataUnregistered: error: undefined reference to 'vtable for __cxxabiv1::__si_class_type_info'
/home/user/ffmpeg-2.8.1/android/arm/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/user/ffmpeg-2.8.1/android/arm/lib/libx265.a(encoder.cpp.o):encoder.cpp:typeinfo for x265::SEIMasteringDisplayColorVolume: error: undefined reference to 'vtable for __cxxabiv1::__si_class_type_info'
/home/user/ffmpeg-2.8.1/android/arm/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/user/ffmpeg-2.8.1/android/arm/lib/libx265.a(threading.cpp.o):threading.cpp:typeinfo for x265::Thread: error: undefined reference to 'vtable for __cxxabiv1::__class_type_info'
/home/user/ffmpeg-2.8.1/android/arm/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/user/ffmpeg-2.8.1/android/arm/lib/libx265.a(wavefront.cpp.o):wavefront.cpp:typeinfo for x265::JobProvider: error: undefined reference to 'vtable for __cxxabiv1::__class_type_info'
/home/user/ffmpeg-2.8.1/android/arm/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/user/ffmpeg-2.8.1/android/arm/lib/libx265.a(slicetype.cpp.o):slicetype.cpp:typeinfo for x265::BondedTaskGroup: error: undefined reference to 'vtable for __cxxabiv1::__class_type_info'
/home/user/ffmpeg-2.8.1/android/arm/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/user/ffmpeg-2.8.1/android/arm/lib/libx265.a(frameencoder.cpp.o):frameencoder.cpp:function x265::FrameEncoder::encodeSlice(): error: undefined reference to '__dynamic_cast'
/home/user/ffmpeg-2.8.1/android/arm/lib/libx265.a(frameencoder.cpp.o):frameencoder.cpp:function x265::FrameEncoder::encodeSlice(): error: undefined reference to '__dynamic_cast'
/home/user/ffmpeg-2.8.1/android/arm/lib/libx265.a(frameencoder.cpp.o):frameencoder.cpp:function x265::FrameEncoder::processRowEncoder(int, x265::ThreadLocalData&): error: undefined reference to '__dynamic_cast'
/home/user/ffmpeg-2.8.1/android/arm/lib/libx265.a(frameencoder.cpp.o):frameencoder.cpp:function .LTHUNK2: error: undefined reference to '__dynamic_cast'
/home/user/ffmpeg-2.8.1/android/arm/lib/libx265.a(frameencoder.cpp.o):frameencoder.cpp:typeinfo for x265::FrameEncoder: error: undefined reference to 'vtable for __cxxabiv1::__vmi_class_type_info'
/home/user/ffmpeg-2.8.1/android/arm/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/user/ffmpeg-2.8.1/android/arm/lib/libx265.a(sei.cpp.o):sei.cpp:typeinfo for x265::SEI: error: undefined reference to 'vtable for __cxxabiv1::__vmi_class_type_info'
/home/user/ffmpeg-2.8.1/android/arm/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
How should I do to fix it?

I found the solution.
I need to add the 「libgnustl_static.a」's path to the gcc/g++ as parameters manually. After do that, the compilation will be successful.

recently i just meet the error, and just as user3032481 said.
i modify the configure of ffmpeg as below.
--extra-libs="-lother_libs -L/Users/shutup/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi -lgnustl_static" \
i think,the reason is that x265 need c++ rtti feature,but android default libstdc++ do not contain it. so we need add libgnustl_static.a .

Related

undefined reference to 'android::RefBase

I encountered below errors when I tred to call hidl APIs in native code, does any one can help to provide solution of these errors:
system/core/libutils/include/utils/StrongPointer.h:168: error: undefined reference to 'android::RefBase::decStrong(void const*) const'
system/core/libutils/include/utils/StrongPointer.h:169: error: undefined reference to 'android::sp_report_race()'
system/core/libutils/include/utils/StrongPointer.h:189: error: undefined reference to 'android::RefBase::decStrong(void const*) const'
system/core/libutils/include/utils/StrongPointer.h:190: error: undefined reference to 'android::sp_report_race()'
"LOCAL_SHARED_LIBRARIES += libutils" should be added into Android.mk

android kernel for ascend mate with linker error

I made a port from a kernel from 4.1 to 4.4, but I get this errors, I know that this error is by the linker, but I have no idea about where find the error because these files are already compiled, sorry for my bad english, this is the comand and the result in the terminal, thanks in advance:
richy#richy-Aspire-V5-572P:~/Lollipop/kernel/mt_4.4$ make -k ARCH=arm zImage
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
drivers/built-in.o:felica_gpio.c:function felica_remove: warning: relocation refers to discarded section
drivers/built-in.o:felica_gpio.c:function felica_remove: warning: relocation refers to discarded section
arch/arm/mach-k3v2/built-in.o:iomux.c:function get_active_block_table.part.0: error: undefined reference to 'g_current_board_id'
arch/arm/mach-k3v2/built-in.o:k3v2_clocks_init_data_cs_60M.c:function iomux_debug_show: error: undefined reference to 'g_current_board_id'
arch/arm/mach-k3v2/built-in.o:k3v2_clocks_init_data_cs_60M.c:function iomux_debug_set: error: undefined reference to 'g_current_board_id'
arch/arm/mach-k3v2/built-in.o:k3v2_clocks_init_data_cs_60M.c:function pmulowpower: error: undefined reference to 'get_battery_removable'
arch/arm/mach-k3v2/built-in.o:k3v2_clocks_init_data_cs_60M.c:function pmulowpower: error: undefined reference to 'get_battery_removable'
arch/arm/mach-k3v2/built-in.o:k3v2_clocks_init_data_cs_60M.c:function pmulowpowerall: error: undefined reference to 'get_battery_removable'
arch/arm/mach-k3v2/built-in.o:k3v2_clocks_init_data_cs_60M.c:function pmulowpowerall: error: undefined reference to 'get_battery_removable'
arch/arm/mach-k3v2/built-in.o:board-k3v2oem1.c:wl18xx_device: error: undefined reference to 'wilink_pdata'
drivers/built-in.o:mipi_jdi_OTM1282B.c:function mipi_jdi_panel_off: error: undefined reference to 'rmi_f01_glove_switch_read'
drivers/built-in.o:mipi_jdi_OTM1282B.c:function mipi_jdi_panel_off: error: undefined reference to 'rmi_fc'
drivers/built-in.o:es305.c:function es305_set_pathid: error: undefined reference to 'is_smartpa_support'
drivers/built-in.o:synaptics_SO340010.c:function synaptics_thread_irq_handler: error: undefined reference to 'time_finger_up'
drivers/built-in.o:synaptics_SO340010.c:function synaptics_thread_irq_handler: error: undefined reference to 'touch_is_pressed'
drivers/built-in.o:felica_gpio.c:function felica_remove: warning: relocation refers to discarded section
drivers/built-in.o:modemctl.c:function modemctl_init: error: undefined reference to 'is_modem_switch_support'
drivers/built-in.o:mipi_jdi_OTM1282B.c:function jdi_probe: error: undefined reference to 'get_touchkey_enable'
drivers/built-in.o:hi6421-regulator.c:function hi6421_regulator_probe: error: undefined reference to 'get_pmu_out26m_enable'
drivers/built-in.o:synaptics_SO340010.c:function touchkey_probe: error: undefined reference to 'get_touchkey_enable'
Makefile:907: recipe for target '.tmp_vmlinux1' failed
make: *** [.tmp_vmlinux1] Error 1
make: Target 'zImage' not remade because of errors.
I read somewhere about this and I fix it, just I've added the definition of these variables or functions, cause the "extern"s don't works for itselfs, i.e.
for the line:
arch/arm/mach-k3v2/built-in.o:iomux.c:function get_active_block_table.part.0: error: undefined reference to 'g_current_board_id'
just is add to the file iomux.c the global
"type" g_current_board_id;
or in the case of functions:
"type" functionname(type args) {}
and that is all

Ubuntu 12.04 Compiling Android master

Set up environment as guided. Had to manually install one dependancy, it removes xorg and ubuntu desktop for some reason when you do.
Installed all things, make version 3.82 so no threading crash, using ccache.
Ran into this crash, any ideas? Clean install, 4GB ram, quad core processor, "lunch aosp_arm-eng; make clean; make -j4":
Warning: AndroidManifest.xml already defines versionCode (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines minSdkVersion (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines targetSdkVersion (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Install: out/target/product/generic/system/app/Email.apk
/home/codelion/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol 'SkBitmap::lockPixels() const' in out/target/product/generic/obj/STATIC_LIBRARIES/skia_skia_library_gyp_intermediates/skia_skia_library_gyp.a(SkBitmap.o) is referenced by DSO out/target/product/generic/obj/lib/libjnigraphics.so
/home/codelion/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol 'SkBitmap::unlockPixels() const' in out/target/product/generic/obj/STATIC_LIBRARIES/skia_skia_library_gyp_intermediates/skia_skia_library_gyp.a(SkBitmap.o) is referenced by DSO out/target/product/generic/obj/lib/libjnigraphics.so
/home/codelion/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol 'SkBitmap::notifyPixelsChanged() const' in out/target/product/generic/obj/STATIC_LIBRARIES/skia_skia_library_gyp_intermediates/skia_skia_library_gyp.a(SkBitmap.o) is referenced by DSO out/target/product/generic/obj/lib/libjnigraphics.so
external/chromium_org/content/browser/renderer_host/media/media_stream_manager.cc:1451: error: undefined reference to 'media::FakeVideoCaptureDeviceFactory::FakeVideoCaptureDeviceFactory()'
external/chromium_org/content/browser/renderer_host/media/media_stream_manager.cc:1462: error: undefined reference to 'vtable for media::FileVideoCaptureDeviceFactory'
external/chromium_org/content/browser/service_worker/service_worker_database.cc:173: error: undefined reference to 'content::ServiceWorkerRegistrationData::ServiceWorkerRegistrationData()'
external/chromium_org/content/browser/service_worker/service_worker_database.cc:194: error: undefined reference to 'content::ServiceWorkerRegistrationData::~ServiceWorkerRegistrationData()'
external/chromium_org/content/browser/service_worker/service_worker_database.cc:125: error: undefined reference to 'content::ServiceWorkerRegistrationData::ServiceWorkerRegistrationData()'
external/chromium_org/content/browser/service_worker/service_worker_database.cc:138: error: undefined reference to 'content::ServiceWorkerRegistrationData::~ServiceWorkerRegistrationData()'
external/chromium_org/content/browser/service_worker/service_worker_database.cc:148: error: undefined reference to 'content::ServiceWorkerResourceRecord::ServiceWorkerResourceRecord()'
external/chromium_org/content/browser/service_worker/service_worker_database.cc:155: error: undefined reference to 'content::ServiceWorkerResourceRecord::~ServiceWorkerResourceRecord()'
external/chromium_org/content/common/gpu/media/android_video_encode_accelerator.cc:78: error: undefined reference to 'media::VideoEncodeAccelerator::~VideoEncodeAccelerator()'
external/chromium_org/content/common/gpu/media/video_decode_accelerator_impl.cc:11: error: undefined reference to 'media::VideoDecodeAccelerator::~VideoDecodeAccelerator()'
external/chromium_org/components/autofill/core/browser/phone_number_i18n.cc:294: error: undefined reference to 'i18n::phonenumbers::PhoneNumber::PhoneNumber(i18n::phonenumbers::PhoneNumber const&)'
external/chromium_org/components/autofill/core/browser/phone_number_i18n.cc:94: error: undefined reference to 'i18n::phonenumbers::PhoneNumber::PhoneNumber()'
out/target/product/generic/obj/GYP/shared_intermediates/protoc_out/third_party/libphonenumber/phonenumbers/phonenumber.pb.h:59: error: undefined reference to 'i18n::phonenumbers::PhoneNumber::CopyFrom(i18n::phonenumbers::PhoneNumber const&)'
external/chromium_org/components/autofill/core/browser/phone_number_i18n.cc:94: error: undefined reference to 'i18n::phonenumbers::PhoneNumber::~PhoneNumber()'
external/chromium_org/components/autofill/core/browser/phone_number_i18n.cc:242: error: undefined reference to 'i18n::phonenumbers::PhoneNumber::PhoneNumber()'
external/chromium_org/components/autofill/core/browser/phone_number_i18n.cc:162: error: undefined reference to 'i18n::phonenumbers::PhoneNumber::PhoneNumber()'
external/chromium_org/components/autofill/core/browser/phone_number_i18n.cc:162: error: undefined reference to 'i18n::phonenumbers::PhoneNumber::~PhoneNumber()'
external/chromium_org/components/autofill/core/browser/phone_number_i18n.cc:183: error: undefined reference to 'i18n::phonenumbers::PhoneNumber::PhoneNumber()'
external/chromium_org/components/autofill/core/browser/phone_number_i18n.cc:183: error: undefined reference to 'i18n::phonenumbers::PhoneNumber::~PhoneNumber()'
external/chromium_org/components/autofill/core/browser/phone_number_i18n.cc:211: error: undefined reference to 'i18n::phonenumbers::PhoneNumber::~PhoneNumber()'
external/chromium_org/content/public/renderer/render_frame_observer.cc:28: error: undefined reference to 'content::RenderFrameImpl::RemoveObserver(content::RenderFrameObserver*)'
external/chromium_org/content/public/renderer/render_frame_observer.cc:21: error: undefined reference to 'content::RenderFrameImpl::AddObserver(content::RenderFrameObserver*)'
external/chromium_org/content/public/renderer/render_view_observer.cc:28: error: undefined reference to 'content::RenderViewImpl::RemoveObserver(content::RenderViewObserver*)'
external/chromium_org/content/public/renderer/render_view_observer.cc:21: error: undefined reference to 'content::RenderViewImpl::AddObserver(content::RenderViewObserver*)'
external/chromium_org/content/renderer/media/android/stream_texture_factory_synchronous_impl.cc:64: error: undefined reference to 'content::RenderThreadImpl::current()'
out/target/product/generic/obj/STATIC_LIBRARIES/content_content_app_both_gyp_intermediates/content_content_app_both_gyp.a(content_main_runner.o):content_main_runner.cc:function content::RunNamedProcessTypeMain(std::string const&, content::MainFunctionParams const&, content::ContentMainDelegate*)::kMainFunctions: error: undefined reference to 'content::RendererMain(content::MainFunctionParams const&)'
out/target/product/generic/obj/GYP/shared_intermediates/protoc_out/third_party/libphonenumber/phonenumbers/phonemetadata.pb.h:1453: error: undefined reference to 'i18n::phonenumbers::PhoneMetadata::default_instance()'
external/stlport/stlport/stl/_pair.h:68: error: undefined reference to 'i18n::phonenumbers::PhoneMetadata::PhoneMetadata(i18n::phonenumbers::PhoneMetadata const&)'
external/chromium_org/third_party/protobuf/src/google/protobuf/repeated_field.h:335: error: undefined reference to 'i18n::phonenumbers::NumberFormat::NumberFormat()'
out/target/product/generic/obj/GYP/shared_intermediates/protoc_out/third_party/libphonenumber/phonenumbers/phonemetadata.pb.h:1621: error: undefined reference to 'i18n::phonenumbers::PhoneMetadata::default_instance()'
out/target/product/generic/obj/GYP/shared_intermediates/protoc_out/third_party/libphonenumber/phonenumbers/phonemetadata.pb.h:1579: error: undefined reference to 'i18n::phonenumbers::PhoneMetadata::default_instance()'
out/target/product/generic/obj/GYP/shared_intermediates/protoc_out/third_party/libphonenumber/phonenumbers/phonemetadata.pb.h:1663: error: undefined reference to 'i18n::phonenumbers::PhoneMetadata::default_instance()'
external/chromium_org/third_party/protobuf/src/google/protobuf/repeated_field.h:339: error: undefined reference to 'i18n::phonenumbers::NumberFormat::MergeFrom(i18n::phonenumbers::NumberFormat const&)'
external/stlport/stlport/stl/_pair.h:68: error: undefined reference to 'i18n::phonenumbers::PhoneMetadata::PhoneMetadata(i18n::phonenumbers::PhoneMetadata const&)'
external/stlport/stlport/stl/_pair.h:51: error: undefined reference to 'i18n::phonenumbers::PhoneMetadata::~PhoneMetadata()'
external/chromium_org/third_party/libphonenumber/src/phonenumbers/phonenumberutil.cc:674: error: undefined reference to 'i18n::phonenumbers::PhoneMetadataCollection::PhoneMetadataCollection()'
external/chromium_org/third_party/libphonenumber/src/phonenumbers/phonenumberutil.cc:725: error: undefined reference to 'i18n::phonenumbers::PhoneMetadataCollection::~PhoneMetadataCollection()'
external/chromium_org/third_party/libphonenumber/src/phonenumbers/phonenumberutil.cc:694: error: undefined reference to 'i18n::phonenumbers::PhoneMetadata::PhoneMetadata(i18n::phonenumbers::PhoneMetadata const&)'
external/stlport/stlport/stl/_pair.h:62: error: undefined reference to 'i18n::phonenumbers::PhoneMetadata::PhoneMetadata(i18n::phonenumbers::PhoneMetadata const&)'
external/stlport/stlport/stl/_pair.h:51: error: undefined reference to 'i18n::phonenumbers::PhoneMetadata::~PhoneMetadata()'
external/stlport/stlport/stl/_pair.h:51: error: undefined reference to 'i18n::phonenumbers::PhoneMetadata::~PhoneMetadata()'
external/chromium_org/third_party/libphonenumber/src/phonenumbers/phonenumberutil.cc:694: error: undefined reference to 'i18n::phonenumbers::PhoneMetadata::~PhoneMetadata()'
external/chromium_org/third_party/libphonenumber/src/phonenumbers/phonenumberutil.cc:1940: error: undefined reference to 'i18n::phonenumbers::PhoneNumber::MergeFrom(i18n::phonenumbers::PhoneNumber const&)'
external/chromium_org/third_party/libphonenumber/src/phonenumbers/phonenumberutil.cc:2166: error: undefined reference to 'i18n::phonenumbers::PhoneNumber::PhoneNumber(i18n::phonenumbers::PhoneNumber const&)'
external/chromium_org/third_party/libphonenumber/src/phonenumbers/phonenumberutil.cc:2599: error: undefined reference to 'i18n::phonenumbers::PhoneNumber::PhoneNumber(i18n::phonenumbers::PhoneNumber const&)'
external/chromium_org/third_party/libphonenumber/src/phonenumbers/phonenumberutil.cc:2600: error: undefined reference to 'i18n::phonenumbers::PhoneNumber::PhoneNumber(i18n::phonenumbers::PhoneNumber const&)'
external/chromium_org/content/renderer/in_process_renderer_thread.cc:23: error: undefined reference to 'content::RenderThreadImpl::RenderThreadImpl(std::string const&)'
collect2: error: ld returned 1 exit status
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so] Error 1
codelion#ubuntu:~/android$
follow http://source.android.com/source/downloading.html
choose a tag from https://android.googlesource.com/platform/manifest/+refs
example:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.4.2_r2

Apportable Errors With iOS app conversion

I am running the command "apportable load" in the directory of my x-code project for an app that is working on the iOS simulator. I have x-code 5.0.2 and when I try to update apportable it says it is the newest version.
I am sorry for the extent of the error output as it may be difficult to read. I notice some errors that are picking out the sound effects and that they cannot be referenced.
Why are the references to settings such as CCScreenModeFixed not identified when they come directly from the spritebuilder interface? Does apportable support sound effects, if so why can't it find mine?
/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/AppDelegate.m:58: error: undefined
reference to 'CCSetupScreenMode'
/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/AppDelegate.m:58: error: undefined
reference to 'CCScreenModeFixed'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(AppDelegate.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/AppDelegate.m:function
L_OBJC_CLASSLIST_REFERENCES_$_22: error: undefined reference to
'OBJC_CLASS_$_CCBReader'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(AppDelegate.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/AppDelegate.m:function
OBJC_METACLASS_$_AppController: error: undefined reference to
'OBJC_METACLASS_$_CCAppDelegate'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(AppDelegate.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/AppDelegate.m:function
OBJC_CLASS_$_AppController: error: undefined reference to
'OBJC_CLASS_$_CCAppDelegate' /Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/Gameplay.m:186: error: undefined
reference to 'clampf'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(Gameplay.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/Gameplay.m:function
L_OBJC_CLASSLIST_REFERENCES_$_: error: undefined reference to
'OBJC_CLASS_$_OALSimpleAudio'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(Gameplay.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/Gameplay.m:function
L_OBJC_CLASSLIST_REFERENCES_$_73: error: undefined reference to
'OBJC_CLASS_$_CCBReader'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(Gameplay.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/Gameplay.m:function
L_OBJC_CLASSLIST_REFERENCES_$_122: error: undefined reference to
'OBJC_CLASS_$_CCDirector'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(Gameplay.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/Gameplay.m:function
L_OBJC_CLASSLIST_REFERENCES_$_133: error: undefined reference to
'OBJC_CLASS_$_CCActionMoveBy'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(Gameplay.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/Gameplay.m:function
L_OBJC_CLASSLIST_REFERENCES_$_138: error: undefined reference to
'OBJC_CLASS_$_CCActionSequence'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(Gameplay.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/Gameplay.m:function
L_OBJC_CLASSLIST_REFERENCES_$_141: error: undefined reference to
'OBJC_CLASS_$_CCActionEaseBounce'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(Gameplay.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/Gameplay.m:function
OBJC_METACLASS_$_Gameplay: error: undefined reference to
'OBJC_METACLASS_$_CCNode'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(Gameplay.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/Gameplay.m:function
OBJC_CLASS_$_Gameplay: error: undefined reference to
'OBJC_CLASS_$_CCNode'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(Goal.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/Goal.m:function
OBJC_METACLASS_$_Goal: error: undefined reference to
'OBJC_METACLASS_$_CCNode'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(Goal.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/Goal.m:function OBJC_CLASS_$_Goal:
error: undefined reference to 'OBJC_CLASS_$_CCNode'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(Hiss.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/Hiss.m:function
OBJC_METACLASS_$_Hiss: error: undefined reference to
'OBJC_METACLASS_$_CCNode'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(Hiss.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/Hiss.m:function OBJC_CLASS_$_Hiss:
error: undefined reference to 'OBJC_CLASS_$_CCNode'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(MainScene.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/MainScene.m:function
L_OBJC_CLASSLIST_REFERENCES_$_: error: undefined reference to
'OBJC_CLASS_$_CCBReader'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(MainScene.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/MainScene.m:function
L_OBJC_CLASSLIST_REFERENCES_$_1: error: undefined reference to
'OBJC_CLASS_$_CCDirector'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(MainScene.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/MainScene.m:function
L_OBJC_CLASSLIST_REFERENCES_$_6: error: undefined reference to
'OBJC_CLASS_$_OALSimpleAudio'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(MainScene.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/MainScene.m:function
OBJC_METACLASS_$_MainScene: error: undefined reference to
'OBJC_METACLASS_$_CCNode'
/Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/com.apportable.Eltie/Eltie/libEltie.a(MainScene.m.o):/Users/mateusz/Documents/SpriteBuilder
Games/Eltie.spritebuilder/Source/MainScene.m:function
OBJC_CLASS_$_MainScene: error: undefined reference to
'OBJC_CLASS_$_CCNode' ninja: build stopped: subcommand failed. Error:
command failed:
/Users/mateusz/.apportable/SDK/toolchain/macosx/ninja/ninja
--no-strip-ansi-escapes -j 8 /Users/mateusz/.apportable/SDK/Build/android-armeabi-debug/Eltie/Eltie-debug.apk
Okay, I figured it out with the help of the answer from this question: static libs with apportable
I did not have the cocos2d library added in the target dependencies section of the build phases tab in x-code. When I added it apportable had no issues finding the undefined types given from spritebuilder and cocos2d.

no android.mk file in Classes Folder for cocos2d-x 1.0.1-x-0.13.0-beta

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.

Categories

Resources