izen 2019-08-05 18:37 采纳率: 0%
浏览 936

SDL2 编译报错error: undefined reference to 'openslES_ResumeDevices' 求解决思路

android studio编译SDL2生成.so文件时,报错如下:

Build command failed.
Error while executing process /Users/ing/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/Android.mk NDK_APPLICATION_MK=/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/Application.mk APP_ABI=x86_64 NDK_ALL_ABIS=x86_64 NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/build/intermediates/ndkBuild/debug/lib /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/build/intermediates/ndkBuild/debug/obj/local/x86_64/libSDL2.so}
[x86_64] Compile        : SDL2 <= SDL.c
[x86_64] Compile        : SDL2 <= SDL_assert.c
[x86_64] Compile        : SDL2 <= SDL_dataqueue.c
[x86_64] Compile        : SDL2 <= SDL_error.c
[x86_64] Compile        : SDL2 <= SDL_hints.c
[x86_64] Compile        : SDL2 <= SDL_log.c
[x86_64] Compile        : SDL2 <= SDL_audio.c
[x86_64] Compile        : SDL2 <= SDL_audiocvt.c
[x86_64] Compile        : SDL2 <= SDL_audiodev.c
[x86_64] Compile        : SDL2 <= SDL_audiotypecvt.c
[x86_64] Compile        : SDL2 <= SDL_mixer.c
[x86_64] Compile        : SDL2 <= SDL_wave.c
[x86_64] Compile        : SDL2 <= SDL_androidaudio.c
[x86_64] Compile        : SDL2 <= SDL_dummyaudio.c
[x86_64] Compile        : SDL2 <= SDL_atomic.c
[x86_64] Compile        : SDL2 <= SDL_spinlock.c
[x86_64] Compile        : SDL2 <= SDL_android.c
[x86_64] Compile        : SDL2 <= SDL_cpuinfo.c
[x86_64] Compile        : SDL2 <= SDL_dynapi.c
[x86_64] Compile        : SDL2 <= SDL_clipboardevents.c
[x86_64] Compile        : SDL2 <= SDL_displayevents.c
[x86_64] Compile        : SDL2 <= SDL_dropevents.c
[x86_64] Compile        : SDL2 <= SDL_events.c
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:285:59: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat]
        SDL_EVENT_CASE(SDL_FINGERDOWN) PRINT_FINGER_EVENT(event); break;
                                       ~~~~~~~~~~~~~~~~~~~^~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:282:50: note: expanded from macro 'PRINT_FINGER_EVENT'
                (uint) event->tfinger.timestamp, event->tfinger.touchId, \
                                                 ^~~~~~~~~~~~~~~~~~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:285:59: warning: format specifies type 'long long' but the argument has type 'SDL_FingerID' (aka 'long') [-Wformat]
        SDL_EVENT_CASE(SDL_FINGERDOWN) PRINT_FINGER_EVENT(event); break;
                                       ~~~~~~~~~~~~~~~~~~~^~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:283:17: note: expanded from macro 'PRINT_FINGER_EVENT'
                event->tfinger.fingerId, event->tfinger.x, event->tfinger.y, \
                ^~~~~~~~~~~~~~~~~~~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:286:57: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat]
        SDL_EVENT_CASE(SDL_FINGERUP) PRINT_FINGER_EVENT(event); break;
                                     ~~~~~~~~~~~~~~~~~~~^~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:282:50: note: expanded from macro 'PRINT_FINGER_EVENT'
                (uint) event->tfinger.timestamp, event->tfinger.touchId, \
                                                 ^~~~~~~~~~~~~~~~~~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:286:57: warning: format specifies type 'long long' but the argument has type 'SDL_FingerID' (aka 'long') [-Wformat]
        SDL_EVENT_CASE(SDL_FINGERUP) PRINT_FINGER_EVENT(event); break;
                                     ~~~~~~~~~~~~~~~~~~~^~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:283:17: note: expanded from macro 'PRINT_FINGER_EVENT'
                event->tfinger.fingerId, event->tfinger.x, event->tfinger.y, \
                ^~~~~~~~~~~~~~~~~~~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:287:61: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat]
        SDL_EVENT_CASE(SDL_FINGERMOTION) PRINT_FINGER_EVENT(event); break;
                                         ~~~~~~~~~~~~~~~~~~~^~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:282:50: note: expanded from macro 'PRINT_FINGER_EVENT'
                (uint) event->tfinger.timestamp, event->tfinger.touchId, \
                                                 ^~~~~~~~~~~~~~~~~~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:287:61: warning: format specifies type 'long long' but the argument has type 'SDL_FingerID' (aka 'long') [-Wformat]
        SDL_EVENT_CASE(SDL_FINGERMOTION) PRINT_FINGER_EVENT(event); break;
                                         ~~~~~~~~~~~~~~~~~~~^~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:283:17: note: expanded from macro 'PRINT_FINGER_EVENT'
                event->tfinger.fingerId, event->tfinger.x, event->tfinger.y, \
                ^~~~~~~~~~~~~~~~~~~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:295:62: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat]
        SDL_EVENT_CASE(SDL_DOLLARGESTURE) PRINT_DOLLAR_EVENT(event); break;
                                          ~~~~~~~~~~~~~~~~~~~^~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:292:51: note: expanded from macro 'PRINT_DOLLAR_EVENT'
                (uint) event->dgesture.timestamp, event->dgesture.touchId, \
                                                  ^~~~~~~~~~~~~~~~~~~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:295:62: warning: format specifies type 'long long' but the argument has type 'SDL_GestureID' (aka 'long') [-Wformat]
        SDL_EVENT_CASE(SDL_DOLLARGESTURE) PRINT_DOLLAR_EVENT(event); break;
                                          ~~~~~~~~~~~~~~~~~~~^~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:293:17: note: expanded from macro 'PRINT_DOLLAR_EVENT'
                event->dgesture.gestureId, (uint) event->dgesture.numFingers, \
                ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:296:61: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat]
        SDL_EVENT_CASE(SDL_DOLLARRECORD) PRINT_DOLLAR_EVENT(event); break;
                                         ~~~~~~~~~~~~~~~~~~~^~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:292:51: note: expanded from macro 'PRINT_DOLLAR_EVENT'
                (uint) event->dgesture.timestamp, event->dgesture.touchId, \
                                                  ^~~~~~~~~~~~~~~~~~~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:296:61: warning: format specifies type 'long long' but the argument has type 'SDL_GestureID' (aka 'long') [-Wformat]
        SDL_EVENT_CASE(SDL_DOLLARRECORD) PRINT_DOLLAR_EVENT(event); break;
                                         ~~~~~~~~~~~~~~~~~~~^~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:293:17: note: expanded from macro 'PRINT_DOLLAR_EVENT'
                event->dgesture.gestureId, (uint) event->dgesture.numFingers, \
                ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:301:51: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat]
                (uint) event->mgesture.timestamp, event->mgesture.touchId,
                                                  ^~~~~~~~~~~~~~~~~~~~~~~
11 warnings generated.
[x86_64] Compile        : SDL2 <= SDL_gesture.c
[x86_64] Compile        : SDL2 <= SDL_keyboard.c
[x86_64] Compile        : SDL2 <= SDL_mouse.c
[x86_64] Compile        : SDL2 <= SDL_quit.c
[x86_64] Compile        : SDL2 <= SDL_touch.c
[x86_64] Compile        : SDL2 <= SDL_windowevents.c
[x86_64] Compile        : SDL2 <= SDL_rwops.c
[x86_64] Compile        : SDL2 <= SDL_haptic.c
[x86_64] Compile        : SDL2 <= SDL_syshaptic.c
[x86_64] Compile        : SDL2 <= SDL_gamecontroller.c
[x86_64] Compile        : SDL2 <= SDL_joystick.c
[x86_64] Compile        : SDL2 <= SDL_sysjoystick.c
[x86_64] Compile        : SDL2 <= SDL_hidapi_ps4.c
[x86_64] Compile        : SDL2 <= SDL_hidapi_switch.c
[x86_64] Compile        : SDL2 <= SDL_hidapi_xbox360.c
[x86_64] Compile        : SDL2 <= SDL_hidapi_xboxone.c
[x86_64] Compile        : SDL2 <= SDL_hidapijoystick.c
[x86_64] Compile        : SDL2 <= SDL_sysloadso.c
[x86_64] Compile        : SDL2 <= SDL_power.c
[x86_64] Compile        : SDL2 <= SDL_syspower.c
[x86_64] Compile        : SDL2 <= SDL_sysfilesystem.c
[x86_64] Compile        : SDL2 <= SDL_sensor.c
[x86_64] Compile        : SDL2 <= SDL_androidsensor.c
[x86_64] Compile        : SDL2 <= SDL_d3dmath.c
[x86_64] Compile        : SDL2 <= SDL_render.c
[x86_64] Compile        : SDL2 <= SDL_yuv_sw.c
[x86_64] Compile        : SDL2 <= SDL_render_d3d.c
[x86_64] Compile        : SDL2 <= SDL_shaders_d3d.c
[x86_64] Compile        : SDL2 <= SDL_render_d3d11.c
[x86_64] Compile        : SDL2 <= SDL_shaders_d3d11.c
[x86_64] Compile        : SDL2 <= SDL_render_gl.c
[x86_64] Compile        : SDL2 <= SDL_shaders_gl.c
[x86_64] Compile        : SDL2 <= SDL_render_gles.c
[x86_64] Compile        : SDL2 <= SDL_render_gles2.c
In file included from /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/render/opengles2/SDL_render_gles2.c:273:
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/render/opengles2/SDL_gles2funcs.h:58:1: warning: incompatible pointer types assigning to 'void (*)(GLuint, GLsizei, const GLchar **, const GLint *)' (aka 'void (*)(unsigned int, int, const char **, const int *)') from 'void (GLuint, GLsizei, const GLchar *const *, const GLint *)' (aka 'void (unsigned int, int, const char *const *, const int *)') [-Wincompatible-pointer-types]
SDL_PROC(void, glShaderSource, (GLuint, GLsizei, const GLchar **, const GLint *))
^              ~~~~~~~~~~~~~~
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/render/opengles2/SDL_render_gles2.c:262:45: note: expanded from macro 'SDL_PROC'
#define SDL_PROC(ret,func,params) data->func=func;
                                            ^~~~~
1 warning generated.
[x86_64] Compile        : SDL2 <= SDL_shaders_gles2.c
[x86_64] Compile        : SDL2 <= SDL_render_psp.c
[x86_64] Compile        : SDL2 <= SDL_blendfillrect.c
[x86_64] Compile        : SDL2 <= SDL_blendline.c
[x86_64] Compile        : SDL2 <= SDL_blendpoint.c
[x86_64] Compile        : SDL2 <= SDL_drawline.c
[x86_64] Compile        : SDL2 <= SDL_drawpoint.c
[x86_64] Compile        : SDL2 <= SDL_render_sw.c
[x86_64] Compile        : SDL2 <= SDL_rotate.c
[x86_64] Compile        : SDL2 <= SDL_getenv.c
[x86_64] Compile        : SDL2 <= SDL_iconv.c
[x86_64] Compile        : SDL2 <= SDL_malloc.c
[x86_64] Compile        : SDL2 <= SDL_qsort.c
[x86_64] Compile        : SDL2 <= SDL_stdlib.c
[x86_64] Compile        : SDL2 <= SDL_string.c
[x86_64] Compile        : SDL2 <= SDL_thread.c
[x86_64] Compile        : SDL2 <= SDL_syscond.c
[x86_64] Compile        : SDL2 <= SDL_sysmutex.c
[x86_64] Compile        : SDL2 <= SDL_syssem.c
[x86_64] Compile        : SDL2 <= SDL_systhread.c
[x86_64] Compile        : SDL2 <= SDL_systls.c
[x86_64] Compile        : SDL2 <= SDL_timer.c
[x86_64] Compile        : SDL2 <= SDL_systimer.c
[x86_64] Compile        : SDL2 <= SDL_RLEaccel.c
[x86_64] Compile        : SDL2 <= SDL_blit.c
[x86_64] Compile        : SDL2 <= SDL_blit_0.c
[x86_64] Compile        : SDL2 <= SDL_blit_1.c
[x86_64] Compile        : SDL2 <= SDL_blit_A.c
[x86_64] Compile        : SDL2 <= SDL_blit_N.c
[x86_64] Compile        : SDL2 <= SDL_blit_auto.c
[x86_64] Compile        : SDL2 <= SDL_blit_copy.c
[x86_64] Compile        : SDL2 <= SDL_blit_slow.c
[x86_64] Compile        : SDL2 <= SDL_bmp.c
[x86_64] Compile        : SDL2 <= SDL_clipboard.c
[x86_64] Compile        : SDL2 <= SDL_egl.c
[x86_64] Compile        : SDL2 <= SDL_fillrect.c
[x86_64] Compile        : SDL2 <= SDL_pixels.c
[x86_64] Compile        : SDL2 <= SDL_rect.c
[x86_64] Compile        : SDL2 <= SDL_shape.c
[x86_64] Compile        : SDL2 <= SDL_stretch.c
[x86_64] Compile        : SDL2 <= SDL_surface.c
[x86_64] Compile        : SDL2 <= SDL_video.c
[x86_64] Compile        : SDL2 <= SDL_vulkan_utils.c
[x86_64] Compile        : SDL2 <= SDL_yuv.c
[x86_64] Compile        : SDL2 <= SDL_androidclipboard.c
[x86_64] Compile        : SDL2 <= SDL_androidevents.c
[x86_64] Compile        : SDL2 <= SDL_androidgl.c
[x86_64] Compile        : SDL2 <= SDL_androidkeyboard.c
[x86_64] Compile        : SDL2 <= SDL_androidmessagebox.c
[x86_64] Compile        : SDL2 <= SDL_androidmouse.c
[x86_64] Compile        : SDL2 <= SDL_androidtouch.c
[x86_64] Compile        : SDL2 <= SDL_androidvideo.c
[x86_64] Compile        : SDL2 <= SDL_androidvulkan.c
[x86_64] Compile        : SDL2 <= SDL_androidwindow.c
[x86_64] Compile        : SDL2 <= yuv_rgb.c
[x86_64] Compile        : SDL2 <= SDL_test_assert.c
[x86_64] Compile        : SDL2 <= SDL_test_common.c
[x86_64] Compile        : SDL2 <= SDL_test_compare.c
[x86_64] Compile        : SDL2 <= SDL_test_crc32.c
[x86_64] Compile        : SDL2 <= SDL_test_font.c
[x86_64] Compile        : SDL2 <= SDL_test_fuzzer.c
[x86_64] Compile        : SDL2 <= SDL_test_harness.c
[x86_64] Compile        : SDL2 <= SDL_test_imageBlit.c
[x86_64] Compile        : SDL2 <= SDL_test_imageBlitBlend.c
[x86_64] Compile        : SDL2 <= SDL_test_imageFace.c
[x86_64] Compile        : SDL2 <= SDL_test_imagePrimitives.c
[x86_64] Compile        : SDL2 <= SDL_test_imagePrimitivesBlend.c
[x86_64] Compile        : SDL2 <= SDL_test_log.c
[x86_64] Compile        : SDL2 <= SDL_test_md5.c
[x86_64] Compile        : SDL2 <= SDL_test_memory.c
[x86_64] Compile        : SDL2 <= SDL_test_random.c
[x86_64] Compile++      : hidapi <= hid.cpp
[x86_64] Prebuilt       : libc++_shared.so <= <NDK>/sources/cxx-stl/llvm-libc++/libs/x86_64/
[x86_64] SharedLibrary  : libhidapi.so
[x86_64] SharedLibrary  : libSDL2.so
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/build/intermediates/ndkBuild/debug/obj/local/x86_64/objs-debug/SDL2/src/audio/SDL_audio.o:SDL_audio.c:bootstrap: error: undefined reference to 'openslES_bootstrap'
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/video/android/SDL_androidevents.c:105: error: undefined reference to 'openslES_PauseDevices'
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/video/android/SDL_androidevents.c:112: error: undefined reference to 'openslES_ResumeDevices'
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/video/android/SDL_androidevents.c:156: error: undefined reference to 'openslES_PauseDevices'
/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/video/android/SDL_androidevents.c:167: error: undefined reference to 'openslES_ResumeDevices'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/build/intermediates/ndkBuild/debug/obj/local/x86_64/libSDL2.so] Error 1



感觉是调用opengl 的相关库时报错,未引用。请教有遇到过此类问题的或者有解决思路的,请不吝赐教。。

  • 写回答

2条回答 默认 最新

  • dabocaiqq 2019-08-06 09:34
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)