how do i fix undefined reference with betterC ?

test test at gmail.com
Tue Oct 16 12:17:38 UTC 2018


On Monday, 15 October 2018 at 08:31:25 UTC, Joakim wrote:
> I was only able to reproduce with 64-bit ARM, not 32-bit. Same 
> for you?

I only has a 64-bit android, and don't know how to made 32-bit to 
work on 64-bit termux.

>> Thanks for tips.
>
> I confirmed that his workaround fixed this problem.


Yes, thanks again.

I  have never develop on Android, the plan is to write  a so file 
from Termux copy it into my desk, build with Android studio and 
SDK 26.


I plan use betterC to avoid GC.

Do I have to install SDK 26 or some NDK package on Termux to 
build so file, and the so file can be used on my Desktop android 
studio project ?

How to modify this file to use my so files?


apply plugin: 'com.android.application'

android {
     compileSdkVersion 28
     defaultConfig {
         applicationId "com.hahaha.demo"
         minSdkVersion 23
         targetSdkVersion 28
         versionCode 1
         versionName "1.0"
         testInstrumentationRunner 
"android.support.test.runner.AndroidJUnitRunner"
         ndk {
             moduleName = "TestProject"
             abiFilters "armeabi-v7a"
         }
     }
     buildTypes {
         release {
             minifyEnabled false
             proguardFiles 
getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
         }
     }
     productFlavors {
         create("arm") {
             ndk.with {
                 abiFilters += "armeabi-v7a"
                 ndk.ldFlags += 
"-L${file("lib/armeabi-v7a/")}".toString()
             }
         }
     }
}

dependencies {
     implementation fileTree(include: ['*.jar'], dir: 'libs')
     implementation 'com.android.support:appcompat-v7:28.0.0'
}







More information about the digitalmars-d-ldc mailing list