Enable C++11 support on Android

后端 未结 4 1026
孤街浪徒
孤街浪徒 2020-12-04 11:47

How do I integrate C++11 into Android?

4条回答
  •  不知归路
    2020-12-04 12:42

    With the latest gradle-experimental-plugin 0.8.0-alpha4 add to your app/build.gradle:

    model {
        android {
            ndk {
                moduleName "native"
                CFlags.add("-std=c11") // Enable C11 support
                ldLibs.add("log")
            }
        }
    }
    

提交回复
热议问题