C++ with gradle

  1. put this in build.gradle

    apply plugin: 'cpp'
    executables {
       hello {}
    }
    
  2. put your source file in src/hello/cpp/say_hello.cpp

  3. run ‘gradle helloExecutable’

  4. your executable should be built to build/binaries/helloExecutable/hello

Or, if you want your source in src/foo/bar then add

sources {
    hello {
      cpp {
        source {
            srcDir "src/foo/bar"
        }
    }
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)