Home > Mobile >  For help, how to build a 64 - bit so, thank you!
For help, how to build a 64 - bit so, thank you!

Time:04-13

Consult:
I have a file now in jni Android. Mk


LOCAL_PATH:=$(call my - dir)


The LOCAL_MODULE: libPort_Dv=
LOCAL_CFLAGS:=- Werror
C
LOCAL_SRC_FILES:=Port_Dv.LOCAL_LDLIBS:=- llog - lGLESv2

The include $(BUILD_SHARED_LIBRARY)

The above is to compile a 32-bit so
And you can use the

Now I need to compile a 64 - bit



LOCAL_PATH:=$(call my - dir)
LOCAL_MULTILIB:=64

The LOCAL_MODULE: libPort_Dv=
LOCAL_CFLAGS:=- Werror
C
LOCAL_SRC_FILES:=Port_Dv.LOCAL_LDLIBS:=- llog - lGLESv2

The include $(BUILD_SHARED_LIBRARY)


So the file can be compiled
But you can't use, I wrong?
How do you write to compile a 64 - bit so

I compiled with the command
The NDK - build

Thank you very much!

CodePudding user response:

DefaultConfig {
The NDK {
AbiFilters' armeabi - v7a ', 'arm64 - v8a'
}
}

CodePudding user response:

DefaultConfig {
The NDK {
AbiFilters' armeabi - v7a ', 'arm64 - v8a'
}
}

Wrote?

Thank you very much!

CodePudding user response:

 
Apply the plugin: '. Com. Android application '

Android {
.
/*
About the CPU instruction set

The NDK 17 above, only support armeabi - v7a arm64 - v8a, x86 and x86-64 four CPU instruction set architecture
*/

//configuration AS engineering of C/C + + source file to compile
//defaultConfig internal externalNativeBuild configuration is configured AS engineering C/C + + source file to compile parameters
//defaultConfig external externalNativeBuild configuration is CMakeList. TXT or Android. Mk build script path
ExternalNativeBuild {
Cmake {
CppFlags ""

//configuration to compile C/C + + source files for which a few CPU instruction set function library (arm, x86, etc.)
AbiFilters armeabi - v7a ", "" arm64 - v8a", "x86, x86_64"
}
}


//configuration APK package which dynamic library
//example: such as compiled in the engineering library, with an arm, x86, MIPS instruction set, such as dynamic library
//so in order to control the size of after packaging applications, can be selectively to pack some libraries, here is the configuration
The NDK {
//packaging generates the APK command contains dynamic library of ARM instruction set
AbiFilters armeabi - v7a ", "" arm64 - v8a", "x86, x86_64"
}


}

//configuration of the NDK build script path
//compile script. There are two kinds of 1) CMakeList TXT (2) Android. Mk
//defaultConfig internal externalNativeBuild configuration is configured AS engineering C/C + + source file to compile parameters
//defaultConfig external externalNativeBuild configuration is CMakeList. TXT or Android. Mk build script path
ExternalNativeBuild {

//configure CMake build script CMakeLists. TXT script path
//when using this configuration, configure ndkBuild commented out
/* cmake {
The path "SRC/main/CPP/CMakeLists. TXT"
The version "3.10.2
"} */

//configuration Android. Mk build script path
//when using this configuration, configure cmake commented out
NdkBuild {
The path "SRC/main/CPP/Android. Mk"
}
}
.
}
.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Copyright statement: this article to CSDN blogger (Han Shuliang) of the original articles, follow BY CC 4.0 - SA the copyright agreement, reproduced and this statement, please attach the original source link
The original link: https://blog.csdn.net/shulianghan/article/details/104272170


"" x86_64 arm64 - v8a", "the two configuration is 64;

Development only when configuration a armeabi - v7a can configure more futile, cause the APK get wider

CodePudding user response:

In the Module of the build. Gradle configuration

CodePudding user response:

I'm going to compile a 64 - bit so
Then he placed the so in unity in


All, is the need to compile a 64 - bit so (DLL)

Thank you very much!
  • Related