mirror of
https://github.com/raysan5/raylib.git
synced 2026-04-10 01:09:10 -04:00
Revert 7605ce853e2c9f458bf69fb15878ecdbd1f5a19a...ec203fd37b0713d82f305365c15d2442dbc32e40 on Working for Android
@ -289,24 +289,6 @@ when compiling,if report "fatal error: 'asm/types.h' file not found ",
|
||||
you need copy "asm-generic" and renamed as "asm".
|
||||
(the path "D:\Program_Files\android_sdk\ndk\25.0.8775105\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\include\asm-generic")
|
||||
|
||||
> [!NOTE]
|
||||
> If you need to load files using a external header like `dr_mp3` please consider overriding the `fopen` to `android_fopen` using a linker wrap.
|
||||
> 1. **Using Make**
|
||||
> - `-Wl,--wrap=fopen`
|
||||
> 2. **Using CMake**
|
||||
> - `target_link_options(${APP_LIB_NAME} PRIVATE "-Wl,--wrap=fopen")`
|
||||
> - If you need to override the fopen using linker wrap here is the implementation sample:
|
||||
> ```c99
|
||||
> #include <stdio.h>
|
||||
> // This makes a signature for the android_fopen that will be implemented on rcore_android.c
|
||||
> extern FILE *android_fopen(const char *fileName, const char *mode);
|
||||
>
|
||||
> // The linker wrap will override the function on it to __wrap_(name)
|
||||
> FILE* __wrap_fopen(const char* path, const char* mode) {
|
||||
> // Call the rcore_android android_fopen function
|
||||
> return android_fopen(path, mode);
|
||||
> }
|
||||
> ```
|
||||
|
||||
**If you have any doubt, [just let me know][raysan5].**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user