mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
Updated Working for Android (markdown)
@ -78,6 +78,26 @@ endif
|
||||
|
||||
```
|
||||
|
||||
**WARNING: If compiled project is developed in C++ instead of C, there are additional considerations:**
|
||||
|
||||
To compile the game into a shared library (`libmain.so`) the following flags are required:
|
||||
|
||||
- Compile C with `clang`: `-std=c99 -lc`
|
||||
- Compile C++ with `clang++`: `-std=c++11 -lc++`
|
||||
|
||||
Add required shared libraries to the generated APK:
|
||||
|
||||
- Compiling in C:
|
||||
```
|
||||
$BUILD_TOOLS/aapt add $__OUTP/$NAME.apk lib/$ABI/libmain.so
|
||||
```
|
||||
- Compiling in C++:
|
||||
```
|
||||
cp $TOOLCHAIN/../../../../sources/cxx-stl/llvm-libc++/libs/$ABI/libc++_shared.so lib/$ABI/libc++_shared.so
|
||||
$BUILD_TOOLS/aapt add $__OUTP/$NAME.apk lib/$ABI/libc++_shared.so
|
||||
$BUILD_TOOLS/aapt add $__OUTP/$NAME.apk lib/$ABI/libmain.so
|
||||
```
|
||||
|
||||
_Step 2:_ To install the APK into connected device (previously intalled drivers and activated USB debug mode on device):
|
||||
|
||||
%ANDROID_SDK_TOOLS%\adb install simple_game.apk
|
||||
|
||||
Reference in New Issue
Block a user