Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Spectrum analyser example



  • Hi,

    I did an implementation based on the spectrum analyser in the Qt examples. Unfortunately it won't compile for Android. The example itself fails too.

    The problem is in the FFTReal library. It won't compile and I don't know why. The error messages QtCreator displays don't help me. Do you have any idea how the library can be fixed to compile for Android?


  • Lifetime Qt Champion

    Hi
    Its impossible to give any guesses when you are not showing the actual errors you get. :)



  • Here it is (sorry, partially in Czech)

    23:15:06: Prováděn postup pro projekt fftreal...
    23:15:06: Spouští se: "C:\Qt\5.11.1\android_armv7\bin\qmake.exe" C:\Qt\Examples\Qt-5.11.1\multimedia\spectrum\3rdparty\fftreal\fftreal.pro -spec android-g++ "CONFIG+=qtquickcompiler"
    Info: creating stash file C:\Qt\Examples\Qt-5.11.1\multimedia\spectrum\3rdparty\build-fftreal-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Vydu00e1nu00ed\.qmake.stash
    23:15:07: Proces "C:\Qt\5.11.1\android_armv7\bin\qmake.exe" byl ukončen obvyklým způsobem.
    23:15:07: Spouští se: "C:\app\Android\SDK\ndk-bundle\prebuilt\windows-x86_64\bin\make.exe" qmake_all
    make: Nothing to be done for `qmake_all'.
    23:15:08: Proces "C:\app\Android\SDK\ndk-bundle\prebuilt\windows-x86_64\bin\make.exe" byl ukončen obvyklým způsobem.
    23:15:08: Spouští se: "C:\app\Android\SDK\ndk-bundle\prebuilt\windows-x86_64\bin\make.exe" 
    C:\app\Android\SDK\ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ -c -D__ANDROID_API__=16 --sysroot=C:\app\Android\SDK\ndk-bundle/sysroot -isystem C:\app\Android\SDK\ndk-bundle/sysroot/usr/include/arm-linux-androideabi -isystem C:\app\Android\SDK\ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem C:\app\Android\SDK\ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -mthumb -Os -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DLOG_SPECTRUMANALYSER -DLOG_ENGINE -DSUPERIMPOSE_PROGRESS_ON_WAVEFORM -DSPECTRUM_ANALYSER_SEPARATE_THREAD -DFFTREAL_LIBRARY -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I..\fftreal -I. -IC:\Qt\5.11.1\android_armv7\include -IC:\Qt\5.11.1\android_armv7\include\QtGui -IC:\Qt\5.11.1\android_armv7\include\QtCore -I. -IC:\Qt\5.11.1\android_armv7\mkspecs\android-g++ -o fftreal_wrapper.obj ..\fftreal\fftreal_wrapper.cpp
    del libfftreal.so
    Could Not Find C:\Qt\Examples\Qt-5.11.1\multimedia\spectrum\3rdparty\build-fftreal-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Vydu00e1nu00ed\libfftreal.so
    C:\app\Android\SDK\ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ --sysroot=C:\app\Android\SDK\ndk-bundle/platforms/android-16/arch-arm/ -Wl,-rpath=C:/Qt/5.11.1/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -Wl,-soname,libfftreal.so -o libfftreal.so fftreal_wrapper.obj -LC:\app\Android\SDK\ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -Lc:/app/android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x -LC:/Qt/5.11.1/android_armv7/lib -lQt5Gui -Lc:\utils\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -Lc:/utils/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.9 -lQt5Core -lGLESv2 -lgnustl_shared -lgcc -llog -lz -lm -ldl -lc 
    del ..\..\libfftreal.so
    Could Not Find C:\Qt\Examples\Qt-5.11.1\multimedia\spectrum\libfftreal.so
    move libfftreal.so ..\..\ 
    process_begin: CreateProcess(NULL, move libfftreal.so "..\.. ", ...) failed.
    make (e=2): Systém nemůže nalézt uvedený soubor.
    
    make: [..\..\libfftreal.so] Error 2 (ignored)
    23:15:11: Proces "C:\app\Android\SDK\ndk-bundle\prebuilt\windows-x86_64\bin\make.exe" byl ukončen obvyklým způsobem.
    23:15:11: Spouští se: "C:\app\Android\SDK\ndk-bundle\prebuilt\windows-x86_64\bin\make.exe" "INSTALL_ROOT=C:\Qt\Examples\Qt-5.11.1\multimedia\spectrum\3rdparty\build-fftreal-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Vydu00e1nu00ed\android-build" install
    del libfftreal.so
    C:\app\Android\SDK\ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ --sysroot=C:\app\Android\SDK\ndk-bundle/platforms/android-16/arch-arm/ -Wl,-rpath=C:/Qt/5.11.1/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -Wl,-soname,libfftreal.so -o libfftreal.so fftreal_wrapper.obj -LC:\app\Android\SDK\ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -Lc:/app/android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x -LC:/Qt/5.11.1/android_armv7/lib -lQt5Gui -Lc:\utils\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -Lc:/utils/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.9 -lQt5Core -lGLESv2 -lgnustl_shared -lgcc -llog -lz -lm -ldl -lc 
    del ..\..\libfftreal.so
    Could Not Find C:\Qt\Examples\Qt-5.11.1\multimedia\spectrum\libfftreal.so
    move libfftreal.so ..\..\ 
    process_begin: CreateProcess(NULL, move libfftreal.so "..\.. ", ...) failed.
    make (e=2): Systém nemůže nalézt uvedený soubor.
    
    make: [..\..\libfftreal.so] Error 2 (ignored)
    C:\Qt\5.11.1\android_armv7\bin\qmake.exe -install qinstall -exe ..\..\libfftreal.so C:\Qt\Examples\Qt-5.11.1\multimedia\spectrum\3rdparty\build-fftreal-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Vydu00e1nu00ed\android-build\libs\armeabi-v7a\libfftreal.so
    Error copying ..\..\libfftreal.so to C:\Qt\Examples\Qt-5.11.1\multimedia\spectrum\3rdparty\build-fftreal-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Vydu00e1nu00ed\android-build\libs\armeabi-v7a\libfftreal.so: Cannot open ..\..\libfftreal.so for input
    make: [install_target] Error 3 (ignored)
    
    

    I think you can simply open the Qt example, select Android and the result will be the same. At least it was for me on multiple PCs.


Log in to reply