Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. How to build OpenAL-Soft and set up it in Qt Creator for Android
Forum Update on Monday, May 27th 2025

How to build OpenAL-Soft and set up it in Qt Creator for Android

Scheduled Pinned Locked Moved Solved Game Development
27 Posts 4 Posters 4.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 8 Offline
    8 Offline
    8Observer8
    wrote on 15 Aug 2023, 13:18 last edited by 8Observer8
    #1

    Hello,

    I didn't find a step by step guide how to build OpenAL-Soft to use it from Qt for Android.

    I tried to make it by copying OpenAL-Soft sources into a project. I copied the OpenAL-Soft sources into my example. You can download my example here from DropBox. I use Qt 6.2.4 and OpenAL-Soft 1.23.1. Please guys download the example archive. Try to compile. Who is more experienced will be able to understand the errors. My example contains the archive openal-soft-1.23.1.zip I will distribute the examples on the forums. It helps a lot to motivate beginners. OpenAL contains functions for working with 3D audio, and this is very attractive. Installing via adding library sources should be easy (apart from some nuances that should be documented), because Qt Creator has the wonderful "Add existing directories..." and "Add existing files..." options.

    I have already done this for Box2D and my app running on PC, emulator and android smartphone with the same codebase. This was the easiest and fastest way to install Box2D. I just copied the sources into the project and immediately switched between Android and Desktop to build APK and EXE. If I had included libraries, I would have spent a lot of time figuring out how to build for Android and how to switch between builds for Android and Desktop.

    I can't ask a question on just one error because the errors can depend on each other. Perhaps someone also tried to add OpenAL-Soft to their project as sources and ran into the same errors.

    785170fc-f027-4634-b3ac-cf3f288db892-image.png

    Some of them:

    dfb261a4-d4a7-478b-a0c4-4ca6dfe59f8a-image.png

    4d29b3c7-19ec-49a0-943e-c4723deed4f4-image.png

    In file included from ..\openal-with-source-using-android-qt6-cpp\core\converter.h:10,
                     from ..\openal-with-source-using-android-qt6-cpp\core\converter.cpp:4:
    ..\openal-with-source-using-android-qt6-cpp\core\mixer/defs.h:67:79: error: expected ',' or '...' before 'src'
       67 | using ResamplerFunc = void(*)(const InterpState *state, const float *RESTRICT src, uint frac,
          |                                                                               ^~~
    ..\openal-with-source-using-android-qt6-cpp\core\mixer/defs.h:74:64: error: expected ',' or '...' before 'src'
    
    J 1 Reply Last reply 15 Aug 2023, 13:29
    0
    • 8 Offline
      8 Offline
      8Observer8
      wrote on 19 Aug 2023, 22:58 last edited by 8Observer8
      #26

      I found the simples way! I just download these sources: https://github.com/AerialX/openal-soft-android and built it using CMake. The libopenal.so library was created. I created the "Play" button. I built my first app that plays music using OpenAL! It works on my smartphone! It's cool!

      My step-by-step guide for Qt 6.2.4 MinGW 64-bit:

      • Download these sources: https://github.com/AerialX/openal-soft-android
      • Download CMake (add it to the Path variable): https://cmake.org/download/
      • Go to openal-soft-android from the console (cd openal-soft-android)
      • Copy the next commands to the console (don't forget to change the path to your android.toolchain.cmake)

      cmake -G "MinGW Makefiles" -S . -B ./build -DCMAKE_TOOLCHAIN_FILE=E:\AppData\Android\SDK\ndk\22.1.7171670\build\cmake\android.toolchain.cmake -DANDROID_ABI=armeabi-v7a -DANDROID_NATIVE_API_LEVEL=29

      cmake --build ./build -j 4

      The libopenal.so will be created. Create a new Qt project. Create the jniLibs/armeabi-v7a folder inside of your Qt project. And copy libopenal.so inside of jniLibs/armeabi-v7a.

      Create the libs\openal-soft\include folder inside of your Qt project and copy the AL folder there.

      Add these settings to your pro-file:

      INCLUDEPATH += $$PWD/libs/openal-soft/include
      
      contains(ANDROID_TARGET_ARCH, armeabi-v7a)
      {
          ANDROID_EXTRA_LIBS += $$PWD/jniLibs/armeabi-v7a/libopenal.so
      }
      

      Added 2/25/2024

      I use these settings to run on Windows, real device, and Android Emulator:

      CONFIG("windows") {
          INCLUDEPATH += $$PWD/libs/openal-soft-desktop-1.23.1/include
          LIBS += -L$$PWD/libs/openal-soft-desktop-1.23.1/lib/x64
          LIBS += -lOpenAL32.dll
      }
      
      CONFIG("armeabi-v7a") {
          INCLUDEPATH += $$PWD/libs/openal-soft-android/include
          contains(ANDROID_TARGET_ARCH, armeabi-v7a)
          {
              ANDROID_EXTRA_LIBS += $$PWD/jniLibs/armeabi-v7a/libopenal.so
          }
      }
      
      CONFIG("x86") {
          INCLUDEPATH += $$PWD/libs/openal-soft-android/include
          contains(ANDROID_TARGET_ARCH, x86)
          {
              ANDROID_EXTRA_LIBS += $$PWD/jniLibs/x86/libopenal.so
          }
      }
      
      1 Reply Last reply
      0
      • 8 8Observer8
        15 Aug 2023, 13:18

        Hello,

        I didn't find a step by step guide how to build OpenAL-Soft to use it from Qt for Android.

        I tried to make it by copying OpenAL-Soft sources into a project. I copied the OpenAL-Soft sources into my example. You can download my example here from DropBox. I use Qt 6.2.4 and OpenAL-Soft 1.23.1. Please guys download the example archive. Try to compile. Who is more experienced will be able to understand the errors. My example contains the archive openal-soft-1.23.1.zip I will distribute the examples on the forums. It helps a lot to motivate beginners. OpenAL contains functions for working with 3D audio, and this is very attractive. Installing via adding library sources should be easy (apart from some nuances that should be documented), because Qt Creator has the wonderful "Add existing directories..." and "Add existing files..." options.

        I have already done this for Box2D and my app running on PC, emulator and android smartphone with the same codebase. This was the easiest and fastest way to install Box2D. I just copied the sources into the project and immediately switched between Android and Desktop to build APK and EXE. If I had included libraries, I would have spent a lot of time figuring out how to build for Android and how to switch between builds for Android and Desktop.

        I can't ask a question on just one error because the errors can depend on each other. Perhaps someone also tried to add OpenAL-Soft to their project as sources and ran into the same errors.

        785170fc-f027-4634-b3ac-cf3f288db892-image.png

        Some of them:

        dfb261a4-d4a7-478b-a0c4-4ca6dfe59f8a-image.png

        4d29b3c7-19ec-49a0-943e-c4723deed4f4-image.png

        In file included from ..\openal-with-source-using-android-qt6-cpp\core\converter.h:10,
                         from ..\openal-with-source-using-android-qt6-cpp\core\converter.cpp:4:
        ..\openal-with-source-using-android-qt6-cpp\core\mixer/defs.h:67:79: error: expected ',' or '...' before 'src'
           67 | using ResamplerFunc = void(*)(const InterpState *state, const float *RESTRICT src, uint frac,
              |                                                                               ^~~
        ..\openal-with-source-using-android-qt6-cpp\core\mixer/defs.h:74:64: error: expected ',' or '...' before 'src'
        
        J Offline
        J Offline
        JonB
        wrote on 15 Aug 2023, 13:29 last edited by JonB
        #2

        @8Observer8
        While you wait for a better answer, maybe from someone who knows about the code you are talking about. I don't know if it will help you diagnose, but I would say that the error and the screenshot indicate that when encountering

        const float*RESTRICT coeffs
        

        the symbol/token RESTRICT is not defined. Something (a #define?) in a header should have done so but appears not to have done. Maybe look where that is supposed to be defined to figure what has/hasn't happened?

        8 1 Reply Last reply 15 Aug 2023, 13:54
        0
        • J JonB
          15 Aug 2023, 13:29

          @8Observer8
          While you wait for a better answer, maybe from someone who knows about the code you are talking about. I don't know if it will help you diagnose, but I would say that the error and the screenshot indicate that when encountering

          const float*RESTRICT coeffs
          

          the symbol/token RESTRICT is not defined. Something (a #define?) in a header should have done so but appears not to have done. Maybe look where that is supposed to be defined to figure what has/hasn't happened?

          8 Offline
          8 Offline
          8Observer8
          wrote on 15 Aug 2023, 13:54 last edited by 8Observer8
          #3

          Yes, I added #define RESTRICT and I see fewer errors. Some files have this line #include "config.h", but this file is not in the OpenAL-Soft source code. I added the empty config.h file. I think this file must be generated by CMake if you are compiling OpenAL-Soft from source. I found the config.h.in file that doesn't have the #define RESTRICT:

          config..h.in

          /* Define if deprecated EAX extensions are enabled */
          #cmakedefine ALSOFT_EAX
          
          /* Define if HRTF data is embedded in the library */
          #cmakedefine ALSOFT_EMBED_HRTF_DATA
          
          /* Define if we have the posix_memalign function */
          #cmakedefine HAVE_POSIX_MEMALIGN
          
          /* Define if we have the _aligned_malloc function */
          #cmakedefine HAVE__ALIGNED_MALLOC
          
          /* Define if we have the proc_pidpath function */
          #cmakedefine HAVE_PROC_PIDPATH
          
          /* Define if we have the getopt function */
          #cmakedefine HAVE_GETOPT
          
          /* Define if we have DBus/RTKit */
          #cmakedefine HAVE_RTKIT
          
          /* Define if we have SSE CPU extensions */
          #cmakedefine HAVE_SSE
          #cmakedefine HAVE_SSE2
          #cmakedefine HAVE_SSE3
          #cmakedefine HAVE_SSE4_1
          
          /* Define if we have ARM Neon CPU extensions */
          #cmakedefine HAVE_NEON
          
          /* Define if we have the ALSA backend */
          #cmakedefine HAVE_ALSA
          
          /* Define if we have the OSS backend */
          #cmakedefine HAVE_OSS
          
          /* Define if we have the PipeWire backend */
          #cmakedefine HAVE_PIPEWIRE
          
          /* Define if we have the Solaris backend */
          #cmakedefine HAVE_SOLARIS
          
          /* Define if we have the SndIO backend */
          #cmakedefine HAVE_SNDIO
          
          /* Define if we have the WASAPI backend */
          #cmakedefine HAVE_WASAPI
          
          /* Define if we have the DSound backend */
          #cmakedefine HAVE_DSOUND
          
          /* Define if we have the Windows Multimedia backend */
          #cmakedefine HAVE_WINMM
          
          /* Define if we have the PortAudio backend */
          #cmakedefine HAVE_PORTAUDIO
          
          /* Define if we have the PulseAudio backend */
          #cmakedefine HAVE_PULSEAUDIO
          
          /* Define if we have the JACK backend */
          #cmakedefine HAVE_JACK
          
          /* Define if we have the CoreAudio backend */
          #cmakedefine HAVE_COREAUDIO
          
          /* Define if we have the OpenSL backend */
          #cmakedefine HAVE_OPENSL
          
          /* Define if we have the Oboe backend */
          #cmakedefine HAVE_OBOE
          
          /* Define if we have the Wave Writer backend */
          #cmakedefine HAVE_WAVE
          
          /* Define if we have the SDL2 backend */
          #cmakedefine HAVE_SDL2
          
          /* Define if we have dlfcn.h */
          #cmakedefine HAVE_DLFCN_H
          
          /* Define if we have pthread_np.h */
          #cmakedefine HAVE_PTHREAD_NP_H
          
          /* Define if we have malloc.h */
          #cmakedefine HAVE_MALLOC_H
          
          /* Define if we have cpuid.h */
          #cmakedefine HAVE_CPUID_H
          
          /* Define if we have intrin.h */
          #cmakedefine HAVE_INTRIN_H
          
          /* Define if we have guiddef.h */
          #cmakedefine HAVE_GUIDDEF_H
          
          /* Define if we have initguid.h */
          #cmakedefine HAVE_INITGUID_H
          
          /* Define if we have GCC's __get_cpuid() */
          #cmakedefine HAVE_GCC_GET_CPUID
          
          /* Define if we have the __cpuid() intrinsic */
          #cmakedefine HAVE_CPUID_INTRINSIC
          
          /* Define if we have SSE intrinsics */
          #cmakedefine HAVE_SSE_INTRINSICS
          
          /* Define if we have pthread_setschedparam() */
          #cmakedefine HAVE_PTHREAD_SETSCHEDPARAM
          
          /* Define if we have pthread_setname_np() */
          #cmakedefine HAVE_PTHREAD_SETNAME_NP
          
          /* Define if we have pthread_set_name_np() */
          #cmakedefine HAVE_PTHREAD_SET_NAME_NP
          
          /* Define the installation data directory */
          #cmakedefine ALSOFT_INSTALL_DATADIR "@ALSOFT_INSTALL_DATADIR@"
          
          
          8 1 Reply Last reply 15 Aug 2023, 14:18
          0
          • 8 8Observer8
            15 Aug 2023, 13:54

            Yes, I added #define RESTRICT and I see fewer errors. Some files have this line #include "config.h", but this file is not in the OpenAL-Soft source code. I added the empty config.h file. I think this file must be generated by CMake if you are compiling OpenAL-Soft from source. I found the config.h.in file that doesn't have the #define RESTRICT:

            config..h.in

            /* Define if deprecated EAX extensions are enabled */
            #cmakedefine ALSOFT_EAX
            
            /* Define if HRTF data is embedded in the library */
            #cmakedefine ALSOFT_EMBED_HRTF_DATA
            
            /* Define if we have the posix_memalign function */
            #cmakedefine HAVE_POSIX_MEMALIGN
            
            /* Define if we have the _aligned_malloc function */
            #cmakedefine HAVE__ALIGNED_MALLOC
            
            /* Define if we have the proc_pidpath function */
            #cmakedefine HAVE_PROC_PIDPATH
            
            /* Define if we have the getopt function */
            #cmakedefine HAVE_GETOPT
            
            /* Define if we have DBus/RTKit */
            #cmakedefine HAVE_RTKIT
            
            /* Define if we have SSE CPU extensions */
            #cmakedefine HAVE_SSE
            #cmakedefine HAVE_SSE2
            #cmakedefine HAVE_SSE3
            #cmakedefine HAVE_SSE4_1
            
            /* Define if we have ARM Neon CPU extensions */
            #cmakedefine HAVE_NEON
            
            /* Define if we have the ALSA backend */
            #cmakedefine HAVE_ALSA
            
            /* Define if we have the OSS backend */
            #cmakedefine HAVE_OSS
            
            /* Define if we have the PipeWire backend */
            #cmakedefine HAVE_PIPEWIRE
            
            /* Define if we have the Solaris backend */
            #cmakedefine HAVE_SOLARIS
            
            /* Define if we have the SndIO backend */
            #cmakedefine HAVE_SNDIO
            
            /* Define if we have the WASAPI backend */
            #cmakedefine HAVE_WASAPI
            
            /* Define if we have the DSound backend */
            #cmakedefine HAVE_DSOUND
            
            /* Define if we have the Windows Multimedia backend */
            #cmakedefine HAVE_WINMM
            
            /* Define if we have the PortAudio backend */
            #cmakedefine HAVE_PORTAUDIO
            
            /* Define if we have the PulseAudio backend */
            #cmakedefine HAVE_PULSEAUDIO
            
            /* Define if we have the JACK backend */
            #cmakedefine HAVE_JACK
            
            /* Define if we have the CoreAudio backend */
            #cmakedefine HAVE_COREAUDIO
            
            /* Define if we have the OpenSL backend */
            #cmakedefine HAVE_OPENSL
            
            /* Define if we have the Oboe backend */
            #cmakedefine HAVE_OBOE
            
            /* Define if we have the Wave Writer backend */
            #cmakedefine HAVE_WAVE
            
            /* Define if we have the SDL2 backend */
            #cmakedefine HAVE_SDL2
            
            /* Define if we have dlfcn.h */
            #cmakedefine HAVE_DLFCN_H
            
            /* Define if we have pthread_np.h */
            #cmakedefine HAVE_PTHREAD_NP_H
            
            /* Define if we have malloc.h */
            #cmakedefine HAVE_MALLOC_H
            
            /* Define if we have cpuid.h */
            #cmakedefine HAVE_CPUID_H
            
            /* Define if we have intrin.h */
            #cmakedefine HAVE_INTRIN_H
            
            /* Define if we have guiddef.h */
            #cmakedefine HAVE_GUIDDEF_H
            
            /* Define if we have initguid.h */
            #cmakedefine HAVE_INITGUID_H
            
            /* Define if we have GCC's __get_cpuid() */
            #cmakedefine HAVE_GCC_GET_CPUID
            
            /* Define if we have the __cpuid() intrinsic */
            #cmakedefine HAVE_CPUID_INTRINSIC
            
            /* Define if we have SSE intrinsics */
            #cmakedefine HAVE_SSE_INTRINSICS
            
            /* Define if we have pthread_setschedparam() */
            #cmakedefine HAVE_PTHREAD_SETSCHEDPARAM
            
            /* Define if we have pthread_setname_np() */
            #cmakedefine HAVE_PTHREAD_SETNAME_NP
            
            /* Define if we have pthread_set_name_np() */
            #cmakedefine HAVE_PTHREAD_SET_NAME_NP
            
            /* Define the installation data directory */
            #cmakedefine ALSOFT_INSTALL_DATADIR "@ALSOFT_INSTALL_DATADIR@"
            
            
            8 Offline
            8 Offline
            8Observer8
            wrote on 15 Aug 2023, 14:18 last edited by
            #4

            You can download my example here from DropBox.

            1 Reply Last reply
            0
            • 8 Offline
              8 Offline
              8Observer8
              wrote on 17 Aug 2023, 09:48 last edited by
              #5

              I tried to build OpenAL-Soft for Android but I have these errors: https://github.com/DJLink/android-openal-soft/issues/1

              E:\Libs\open-soft-android\android-openal-soft-master\jni>ndk-build
              fcntl(): Bad file descriptor
              Android NDK: The armeabi ABI is no longer supported. Use armeabi-v7a.
              Android NDK: NDK Application 'local' targets unknown ABI(s): armeabi
              Android NDK: Please fix the APP_ABI definition in E:/Libs/open-soft-android/android-openal-soft-master/jni/Application.mk E:/AppData/Android/SDK/ndk/22.1.7171670/build//../build/core/setup-app.mk:76: *** Android NDK: Aborting . Stop.

              JoeCFDJ 1 Reply Last reply 17 Aug 2023, 15:24
              0
              • 8 8Observer8
                17 Aug 2023, 09:48

                I tried to build OpenAL-Soft for Android but I have these errors: https://github.com/DJLink/android-openal-soft/issues/1

                E:\Libs\open-soft-android\android-openal-soft-master\jni>ndk-build
                fcntl(): Bad file descriptor
                Android NDK: The armeabi ABI is no longer supported. Use armeabi-v7a.
                Android NDK: NDK Application 'local' targets unknown ABI(s): armeabi
                Android NDK: Please fix the APP_ABI definition in E:/Libs/open-soft-android/android-openal-soft-master/jni/Application.mk E:/AppData/Android/SDK/ndk/22.1.7171670/build//../build/core/setup-app.mk:76: *** Android NDK: Aborting . Stop.

                JoeCFDJ Offline
                JoeCFDJ Offline
                JoeCFD
                wrote on 17 Aug 2023, 15:24 last edited by
                #6

                @8Observer8 You need to show the picture of Tools->Options->Devices->Android

                8 1 Reply Last reply 17 Aug 2023, 15:43
                0
                • JoeCFDJ JoeCFD
                  17 Aug 2023, 15:24

                  @8Observer8 You need to show the picture of Tools->Options->Devices->Android

                  8 Offline
                  8 Offline
                  8Observer8
                  wrote on 17 Aug 2023, 15:43 last edited by 8Observer8
                  #7

                  @JoeCFD,

                  8c71b56a-dbdd-47a6-bfd9-f8754d28bfaa-image.png

                  JoeCFDJ 1 Reply Last reply 17 Aug 2023, 15:47
                  0
                  • 8 8Observer8
                    17 Aug 2023, 15:43

                    @JoeCFD,

                    8c71b56a-dbdd-47a6-bfd9-f8754d28bfaa-image.png

                    JoeCFDJ Offline
                    JoeCFDJ Offline
                    JoeCFD
                    wrote on 17 Aug 2023, 15:47 last edited by
                    #8

                    @8Observer8 what is your targeted android version(s)?

                    8 1 Reply Last reply 17 Aug 2023, 15:50
                    0
                    • JoeCFDJ JoeCFD
                      17 Aug 2023, 15:47

                      @8Observer8 what is your targeted android version(s)?

                      8 Offline
                      8 Offline
                      8Observer8
                      wrote on 17 Aug 2023, 15:50 last edited by
                      #9

                      @JoeCFD,

                      522c21ca-0cf7-4d8e-8a42-15a4d8d3e33d-image.png

                      JoeCFDJ 1 Reply Last reply 17 Aug 2023, 15:54
                      0
                      • 8 Offline
                        8 Offline
                        8Observer8
                        wrote on 17 Aug 2023, 15:51 last edited by
                        #10

                        I added Bullet Physics to the project using sources. It works for emulator and for smartphone too:

                        c00807a0-f584-4fe8-a5ac-0dad84e55b09-image.png

                        1 Reply Last reply
                        0
                        • 8 8Observer8
                          17 Aug 2023, 15:50

                          @JoeCFD,

                          522c21ca-0cf7-4d8e-8a42-15a4d8d3e33d-image.png

                          JoeCFDJ Offline
                          JoeCFDJ Offline
                          JoeCFD
                          wrote on 17 Aug 2023, 15:54 last edited by JoeCFD
                          #11

                          @8Observer8
                          from here:
                          https://developer.android.com/build/jdks

                          14 (API 34) 17 Core libraries
                          13 (API 33) 11 Core libraries
                          12 (API 32) 11 Java API
                          11 and lower Android versions

                          =============================
                          your JDK version should be 11, not 17 for Android 7.
                          Still Android 7? I guess most Android phones have version 12 or 13 now.

                          8 1 Reply Last reply 17 Aug 2023, 15:56
                          0
                          • JoeCFDJ JoeCFD
                            17 Aug 2023, 15:54

                            @8Observer8
                            from here:
                            https://developer.android.com/build/jdks

                            14 (API 34) 17 Core libraries
                            13 (API 33) 11 Core libraries
                            12 (API 32) 11 Java API
                            11 and lower Android versions

                            =============================
                            your JDK version should be 11, not 17 for Android 7.
                            Still Android 7? I guess most Android phones have version 12 or 13 now.

                            8 Offline
                            8 Offline
                            8Observer8
                            wrote on 17 Aug 2023, 15:56 last edited by 8Observer8
                            #12

                            @JoeCFD said in How to install OpenAL-Soft for Android in Qt Creator by copying OpenAL-Soft sources into a project:

                            Still Android 7?

                            I have Redmi 4x with Android 7

                            JoeCFDJ 1 Reply Last reply 17 Aug 2023, 15:56
                            0
                            • 8 8Observer8
                              17 Aug 2023, 15:56

                              @JoeCFD said in How to install OpenAL-Soft for Android in Qt Creator by copying OpenAL-Soft sources into a project:

                              Still Android 7?

                              I have Redmi 4x with Android 7

                              JoeCFDJ Offline
                              JoeCFDJ Offline
                              JoeCFD
                              wrote on 17 Aug 2023, 15:56 last edited by
                              #13

                              @8Observer8 That is very old. Then your JDK version is wrong at the first place.

                              8 1 Reply Last reply 17 Aug 2023, 16:01
                              0
                              • JoeCFDJ JoeCFD
                                17 Aug 2023, 15:56

                                @8Observer8 That is very old. Then your JDK version is wrong at the first place.

                                8 Offline
                                8 Offline
                                8Observer8
                                wrote on 17 Aug 2023, 16:01 last edited by 8Observer8
                                #14

                                @JoeCFD,

                                Android NDK: The armeabi ABI is no longer supported. Use armeabi-v7a.

                                I use armeabi-v7a when I build for smartphone (and x86_64 - for emulator) but how to use armeabi-v7a when I build from the console? It will be good to have at lease a library for smartphone.

                                8f6cedfa-b1c2-44b5-b168-c3bdfb414448-image.png

                                JoeCFDJ 1 Reply Last reply 17 Aug 2023, 16:15
                                0
                                • 8 8Observer8
                                  17 Aug 2023, 16:01

                                  @JoeCFD,

                                  Android NDK: The armeabi ABI is no longer supported. Use armeabi-v7a.

                                  I use armeabi-v7a when I build for smartphone (and x86_64 - for emulator) but how to use armeabi-v7a when I build from the console? It will be good to have at lease a library for smartphone.

                                  8f6cedfa-b1c2-44b5-b168-c3bdfb414448-image.png

                                  JoeCFDJ Offline
                                  JoeCFDJ Offline
                                  JoeCFD
                                  wrote on 17 Aug 2023, 16:15 last edited by JoeCFD
                                  #15

                                  @8Observer8 show Projects->Build(Android)->Build Settings
                                  click qmake "Details" button under Build Steps. You will see options for ABIs on QtCreator 11.0.1(comes with Qt-5.15.2)
                                  I use arm64-v8a and my JDK version is 11. My target Android versions are 12/13.

                                  8 1 Reply Last reply 17 Aug 2023, 16:31
                                  0
                                  • JoeCFDJ JoeCFD
                                    17 Aug 2023, 16:15

                                    @8Observer8 show Projects->Build(Android)->Build Settings
                                    click qmake "Details" button under Build Steps. You will see options for ABIs on QtCreator 11.0.1(comes with Qt-5.15.2)
                                    I use arm64-v8a and my JDK version is 11. My target Android versions are 12/13.

                                    8 Offline
                                    8 Offline
                                    8Observer8
                                    wrote on 17 Aug 2023, 16:31 last edited by
                                    #16

                                    @JoeCFD,

                                    For emulator:

                                    dae70765-35fa-467e-ac86-250e95d9e48e-image.png

                                    For APK:

                                    08c1afca-46c1-4727-a3a8-7d820e008ea6-image.png

                                    But I want to try to build the OpenAL-Soft shared (or static) library from the console using this command ndk-build. How to choose armeabi-v7a?

                                    JoeCFDJ 1 Reply Last reply 17 Aug 2023, 16:33
                                    0
                                    • 8 8Observer8
                                      17 Aug 2023, 16:31

                                      @JoeCFD,

                                      For emulator:

                                      dae70765-35fa-467e-ac86-250e95d9e48e-image.png

                                      For APK:

                                      08c1afca-46c1-4727-a3a8-7d820e008ea6-image.png

                                      But I want to try to build the OpenAL-Soft shared (or static) library from the console using this command ndk-build. How to choose armeabi-v7a?

                                      JoeCFDJ Offline
                                      JoeCFDJ Offline
                                      JoeCFD
                                      wrote on 17 Aug 2023, 16:33 last edited by
                                      #17

                                      @8Observer8 I guess you have a different version of qt creator. I do not know yours.

                                      8 1 Reply Last reply 17 Aug 2023, 16:47
                                      0
                                      • JoeCFDJ JoeCFD
                                        17 Aug 2023, 16:33

                                        @8Observer8 I guess you have a different version of qt creator. I do not know yours.

                                        8 Offline
                                        8 Offline
                                        8Observer8
                                        wrote on 17 Aug 2023, 16:47 last edited by
                                        #18

                                        @JoeCFD My version of Qt Creator is 7.0.0. But I use pure NDK from the console to build OpenAL-Soft from sources. How do you know that OpenAL-Soft doesn't support Android 7?

                                        7b149c89-bd99-4cc3-a28e-7e8da9dc73d8-image.png

                                        JoeCFDJ 1 Reply Last reply 17 Aug 2023, 16:53
                                        0
                                        • 8 8Observer8
                                          17 Aug 2023, 16:47

                                          @JoeCFD My version of Qt Creator is 7.0.0. But I use pure NDK from the console to build OpenAL-Soft from sources. How do you know that OpenAL-Soft doesn't support Android 7?

                                          7b149c89-bd99-4cc3-a28e-7e8da9dc73d8-image.png

                                          JoeCFDJ Offline
                                          JoeCFDJ Offline
                                          JoeCFD
                                          wrote on 17 Aug 2023, 16:53 last edited by JoeCFD
                                          #19

                                          @8Observer8 You build OpenAL-Soft for Android 7. I did not say it does not support Android 7.
                                          Instead you need JDK 11 to build C++ apps for Android 7. But in your settings, JDK 17 is used.

                                          8 1 Reply Last reply 17 Aug 2023, 17:17
                                          0
                                          • JoeCFDJ JoeCFD
                                            17 Aug 2023, 16:53

                                            @8Observer8 You build OpenAL-Soft for Android 7. I did not say it does not support Android 7.
                                            Instead you need JDK 11 to build C++ apps for Android 7. But in your settings, JDK 17 is used.

                                            8 Offline
                                            8 Offline
                                            8Observer8
                                            wrote on 17 Aug 2023, 17:17 last edited by 8Observer8
                                            #20

                                            @JoeCFD said in How to install OpenAL-Soft for Android in Qt Creator by copying OpenAL-Soft sources into a project:

                                            Instead you need JDK 11 to build C++ apps for Android 7. But in your settings, JDK 17 is used.

                                            I tried to run apps with Box2D and Bullet Physics on real smartphone Redmi 4x with Android 7. I use JDK 17 and it works. I tried to run an example with QMediaPlayer on my smartphone and it plays music. I think I found a solution. I should try to use Bass Audio Library for 3D sounds on Android. It's is too difficult to add OpenAL-Soft directly with sources. Now I know this information:

                                            Note that OpenAL is LGPL-licensed. Which means you need to release the source to your application if you make it part of your application.

                                            JoeCFDJ 1 Reply Last reply 17 Aug 2023, 18:03
                                            0

                                            1/27

                                            15 Aug 2023, 13:18

                                            • Login

                                            • Login or register to search.
                                            1 out of 27
                                            • First post
                                              1/27
                                              Last post
                                            0
                                            • Categories
                                            • Recent
                                            • Tags
                                            • Popular
                                            • Users
                                            • Groups
                                            • Search
                                            • Get Qt Extensions
                                            • Unsolved