2019년 10월 12일 토요일

Android NDK 작성법 CMakeLists.txt 사용 -2

1 . Native c++ 프로젝트로 시작하면 CMakeLists, cpp 폴더 등 자동 설정된 채로 프로젝트를 시작할수있다.
2 . CMakelist.txt 의 설명은 여기를 참고 *https://crmn.tistory.com/80
    굳이 CMake 를 배우려면 https://www.tuwlab.com/ece/27234
3 . CMakelists 에 사용할 라이브러리 추가

add_library(
        hello-libs 
        SHARED
        hello-libs.cpp)
4 . Activity 에서는

    // Used to load the 'native-lib' library on application startup.
    static {
        System.loadLibrary("native-lib");
        System.loadLibrary("hello-libs");
    }

    public native String getHello();
5.끝.


0 comments:

댓글 쓰기