Giter Club home page Giter Club logo

Comments (10)

Bzi-Han avatar Bzi-Han commented on July 22, 2024

For build this project you can see README.md, you can use Termux app to complete it on Android phone.
Or if you want to use the Surface standalone, you can copy the modules/ANativeWindowCreator.h header file into your project and include it.
Then you can call android::ANativeWindowCreator::Create to create a Surface.

from androidsurfaceimgui.

NyaruToru avatar NyaruToru commented on July 22, 2024

I can't compile Can you please send NDK for Termux?

from androidsurfaceimgui.

NyaruToru avatar NyaruToru commented on July 22, 2024

root@localhost:~/AndroidSurfaceImgui# cmake -DCMAKE_TOOLCHAIN_FILE=android-ndk-r25c/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-23 -DANDROID_ABI=arm64-v8a -S . -B buld -G Ninja -- The C compiler identification is unknown -- The CXX compiler identification is unknown -- Detecting C compiler ABI info -- Detecting C compiler ABI info - failed -- Check for working C compiler: /root/AndroidSurfaceImgui/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -- Check for working C compiler: /root/AndroidSurfaceImgui/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang - broken CMake Error at /usr/share/cmake-3.25/Modules/CMakeTestCCompiler.cmake:70 (message): The C compiler "/root/AndroidSurfaceImgui/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang" is not able to compile a simple test program. It fails with the following output: Change Dir: /root/AndroidSurfaceImgui/buld/CMakeFiles/CMakeScratch/TryCompile-s9UfoT Run Build Command(s):/usr/bin/ninja cmTC_e4a53 && [1/2] Building C object CMakeFiles/cmTC_e4a53.dir/testCCompiler.c.o FAILED: CMakeFiles/cmTC_e4a53.dir/testCCompiler.c.o /root/AndroidSurfaceImgui/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -o CMakeFiles/cmTC_e4a53.dir/testCCompiler.c.o -c /root/AndroidSurfaceImgui/buld/CMakeFiles/CMakeScratch/TryCompile-s9UfoT/testCCompiler.c /bin/sh: 1: /root/AndroidSurfaceImgui/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang: not found ninja: build stopped: subcommand failed. CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:3 (project) -- Configuring incomplete, errors occurred! See also "/root/AndroidSurfaceImgui/buld/CMakeFiles/CMakeOutput.log". See also "/root/AndroidSurfaceImgui/buld/CMakeFiles/CMakeError.log".

from androidsurfaceimgui.

Bzi-Han avatar Bzi-Han commented on July 22, 2024

You shouldn't use the official Android NDK, it only supports the x86 platform of Linux.
You can try this termux-ndk for compile.

from androidsurfaceimgui.

NyaruToru avatar NyaruToru commented on July 22, 2024

You have contact? like telegram

from androidsurfaceimgui.

Bzi-Han avatar Bzi-Han commented on July 22, 2024

I'm tried termux-ndk-r24, it works well.

But you need patch 5 files of Android-Clang.cmake, Android-Determine.cmake, Android-Initialize.cmake, Android.cmake, Determine-Compiler.cmake, then the CMake should be work to build.

For me, there files path is:

  • ~/../usr/share/cmake-3.26/Modules/Platform/Android-Clang.cmake
  • ~/../usr/share/cmake-3.26/Modules/Platform/Android-Determine.cmake
  • ~/../usr/share/cmake-3.26/Modules/Platform/Android-Initialize.cmake
  • ~/../usr/share/cmake-3.26/Modules/Platform/Android.cmake
  • ~/../usr/share/cmake-3.26/Modules/Platform/Android/Determine-Compiler.cmake

CMake version is 3.26.4.

AndroidPhoneCMakeBuild

from androidsurfaceimgui.

Bzi-Han avatar Bzi-Han commented on July 22, 2024

I'm only use QQ.

from androidsurfaceimgui.

NyaruToru avatar NyaruToru commented on July 22, 2024

How to patch 5file i build i got error

from androidsurfaceimgui.

Bzi-Han avatar Bzi-Han commented on July 22, 2024

Here: https://github.com/Lzhiyong/termux-ndk/tree/master/patches/cmake

from androidsurfaceimgui.

NyaruToru avatar NyaruToru commented on July 22, 2024

Thank

from androidsurfaceimgui.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.