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

Issues with cmake, cmakelist.txt



  • Hi,
    I am trying to build and use any zxing library. I am quite a beginner on this type of things, so this might explain my problems! Whatever version I try, I seem to fall into cmake related issues.

    If I try to compile this library:
    https://github.com/nu-book/zxing-cpp

    I configure this project to use two kits:
    Android for armeabi-v7a
    MinGW 64-bit (Android is my target, but I sometimes run a mingw compile to debug locally)

    In the Android kit, I get this error while analyzing the cmakelist.txt file:

    Check for working C compiler: E:/Android/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- broken
    CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/CMakeTestCCompiler.cmake:51 (message):
      The C compiler
      "E:/Android/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe"
      is not able to compile a simple test program.
    

    The error log file shows:

    Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
    Compiler: E:/Android/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe 
    Build flags: 
    Id flags: 
    
    The output was:
    
    1
    clang.exe: error: unable to execute command: program not executable
    clang.exe: error: linker command failed with exit code 1 (use -v to see invocation)
    

    This is under Windows 10. I have disabled my anti virus, just in case, and verified permissions on clang.exe, which can be run by anyone.

    On minGW, the error is:

    CMake Project parsing failed.
    Running "C:\Program Files\CMake\bin\cmake.exe -E server "--pipe=\\.\pipe\{19820c48-966a-411b-867a-a0d992ec452f}" --experimental" in E:\QtBuilds\build-zxing-cpp-Desktop_Qt_5_12_4_MinGW_64_bit-Default.
    QLocalSocket::connectToServer: Invalid name
    Parsing of CMake project failed: Connection to CMake server lost.
    

    I am using cmake version 3.7.2 (tried with the latest, did not work either), and Qt 5.12.4

    Any idea on where to look next? Thanks.


Log in to reply