Android NDK 是否支持大多数 UNIX 系统调用? [英] Does the Android NDK support most UNIX system calls?
本文介绍了Android NDK 是否支持大多数 UNIX 系统调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试修复并移植一个用 C 编写的旧项目以在 Android 上运行.本项目使用系统调用,例如stat(file, inode)和system(command).
I'm attempting to fix and then port an old project written in C to run on Android. This project uses system calls, such as stat(file, inode) and system(command).
Android NDK 是否完全支持这些功能?还是我最好用 Java 重写整个项目?
Are these features fully supported in the Android NDK? Or would I be better off rewriting the whole project in Java?
推荐答案
是的,您可以在 Android NDK 中使用系统调用和 libc 函数.
Yes, you can use system calls and libc functions with Android NDK.
- https://github.com/android/platform_bionic/blob/master/libc/SYSCALLS.TXT
- system() - https://github.com/android/platform_bionic/blob/master/libc/include/stdlib.h#L99
- https://github.com/android/platform_bionic/blob/master/libc/docs/OVERVIEW.TXT
- http://mobilepearls.com/labs/native-android-api/
这篇关于Android NDK 是否支持大多数 UNIX 系统调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文