All Projects → lilinxiong → UseCmakeBuildLib

lilinxiong / UseCmakeBuildLib

Licence: other
用Cmake的方式构建a静态库,so动态库,且集成到项目中

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
c
50402 projects - #5 most used programming language
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to UseCmakeBuildLib

Androidsecurity
Android安全实践
Stars: ✭ 150 (+226.09%)
Mutual labels:  ndk
Android Disassembler
Disassemble ANY files including .so (NDK, JNI), Windows PE(EXE, DLL, SYS, etc), linux binaries, libraries, and any other files such as pictures, audios, etc(for fun)files on Android. Capstone-based disassembler application on android. 안드로이드 NDK 공유 라이브러리, Windows 바이너리, etc,... 리버싱 앱
Stars: ✭ 250 (+443.48%)
Mutual labels:  ndk
Android-Code-Demos
📦 Android learning code demos.
Stars: ✭ 41 (-10.87%)
Mutual labels:  ndk
Hidex Hack
anti reverse by hack dex file
Stars: ✭ 160 (+247.83%)
Mutual labels:  ndk
Relinker
A robust native library loader for Android.
Stars: ✭ 2,612 (+5578.26%)
Mutual labels:  ndk
opencv android setup tutorial
Tutorial on OpenCV for Android with Android Studio
Stars: ✭ 32 (-30.43%)
Mutual labels:  ndk
Stunning Signature
Native Signature Verification For Android (with example)
Stars: ✭ 139 (+202.17%)
Mutual labels:  ndk
SvmNest
a frame of amd-v svm nest
Stars: ✭ 47 (+2.17%)
Mutual labels:  a
Sol2
Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
Stars: ✭ 2,791 (+5967.39%)
Mutual labels:  ndk
PersonDemo
🔥 一些个人学习中备份的技术方案
Stars: ✭ 16 (-65.22%)
Mutual labels:  ndk
Mwengine
Audio engine and DSP for Android, written in C++ providing low latency performance in a musical context, supporting both OpenSL and AAudio.
Stars: ✭ 190 (+313.04%)
Mutual labels:  ndk
Ffmpeg Android Maker
Contains a script that assembles FFmpeg library for Android
Stars: ✭ 207 (+350%)
Mutual labels:  ndk
POS---Point-Of-Sales
Point of sales proof of concept developed using Asp.Net Core 2.2. Features: Customer, Vendor, Product, Purchase Order, Goods Receive, Sales Order, Inventory Transactions and POS form.
Stars: ✭ 120 (+160.87%)
Mutual labels:  so
Jpegkit Android
Efficient JPEG operations for Android without the risk of an OutOfMemoryException.
Stars: ✭ 154 (+234.78%)
Mutual labels:  ndk
Android-T3
Android 核心知识点整理归纳!!!
Stars: ✭ 315 (+584.78%)
Mutual labels:  ndk
Cargo Ndk
Compile Rust projects against the Android NDK without hassle
Stars: ✭ 141 (+206.52%)
Mutual labels:  ndk
libwebrtc
A C++ wrapper for binary release, mainly used for flutter-webrtc desktop (windows, linux, embedded).
Stars: ✭ 209 (+354.35%)
Mutual labels:  so
Tango-C-NDK-Tutorial
Helping those who want to get involved in the realm of Augmented Reality
Stars: ✭ 16 (-65.22%)
Mutual labels:  ndk
SecuritySample
(Android) Hide encrypted secret API keys in C/C++ code, retrieve and decrypt them via JNI. Google SafetyNet APIs example.
Stars: ✭ 49 (+6.52%)
Mutual labels:  ndk
ZeeArchiver
Zee is an efficient and simple to use Android Archiver and decompressor. It can decompress and compress from-to all the formats supported by the well known 7zip utility. Copyright © 2018 Mahmoud Galal , for support contact me:[email protected]
Stars: ✭ 35 (-23.91%)
Mutual labels:  ndk

使用Cmake构建.a静态库和.so动态库

Demo中子模块说明:

  • libcode: 以源码的形式将SDK依赖到cpp中使用
  • libsosimple: 构建hello简单的.so动态库,且将.so和所需头文件导出到 project/export/libsohello 目录中
  • libsojsoncpp: 构建jsoncpp的.so动态库,且将.so和所需头文件导出到 project/export/libsojsoncpp 目录中
  • libasimple: 构建一个hello简单的.a静态库,且将.a和所需头文件导出到 project/export/libahello 目录中
  • libajsoncpp: 构建jsoncpp的.a静态库,且将.a和所需头文件导出到 project/export/libajsoncpp 目录中

注:

  1. export 是编译 任何一个模块 自己在当前项目目录下自动生成的;
  2. app/src/main/cpp/CmakeLists.txt 中的注释是关于链接so动态库、a静态库、链接头文件到native;
  3. libasimple/build.gradle 中需要设置一下 targets 名称,最好和 libasimple/src/main/cpp/hello/CmakeLists.txt 中的名字一样 如下:
    android {
    ...
        defaultConfig {
            ...
            externalNativeBuild {
                cmake {
                ...
                    targets "hello"
                ...
                }
            }
            ...
        }
    ...
    }
    
  4. libasimple/src/main/cpp/CmakeLists.txt 中的注释是关于 编译前期目录配置 和 链接 子目录;
  5. libasimple/src/main/cpp/hello/CmakeLists.txt 中的注释是关于 库名字、库类型、库导出路径、头文件导出;
  6. libsosimple/src/main/cpp/hello/CmakeLists.txt 中的注释是关于 so动态库如何导出,相比 第5条 只改了一个参数;
  7. libajsoncpp/src/main/cpp/jsoncpp/CmakeLists.txt 中的注释是关于 相比 第5条 多了一个 按文件夹导出的命令;
  8. app/build.gradle 中最重要的注释是关于集成so动态库时的注意事项,配置如下:
    android {
    ...
        sourceSets {
            main {
                jniLibs.srcDirs = ['../export/libsohello/lib', '../export/libsojsoncpp/lib']
            }
        }
    ...
    }
    

OTHER

提一个问题:

env->GetStringUTFChars(string, NULL);
env->ReleaseStringUTFChars(string, const char*);

这两个必须成对出现吗? 说出理由。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].