Build C++ using Gradle

Asked

Viewed 289 times

18

The Gradle and a great ally in java and android development. I was looking at the site and realized that it can also manage projects in c++.

How can I use it to compile a super simple project (hello word)?

  • https://docs.gradle.org/current/userguide/native_software.html

  • 1
  • Rodrigo, did these links resolve the doubt? If yes, please post a reply explaining! Thank you.

  • At the address below, available on github, you will find several examples of settings available for Android NDK and Gradle. https://github.com/googlesamples/android-ndk. You will also find several examples of "Hello"

  • Did or did not?

  • no ... but I would still like to see the answer

Show 1 more comment

1 answer

1


// build.gradle
apply plugin: 'cpp'

libraries {
   hello {}
}
executables {
   main {
      binaries.all {
          lib libraries.hello.shared
      }
  }
}
  • This example made available here
  • if you want to learn more about Radle that course is very complete and free

Browser other questions tagged

You are not signed in. Login or sign up in order to post.