anchor.diff:  
   https://github.com/gradle/native-samples/tree/master/cpp/binary-dependencies[See a sample].
   
  -[[cpp:external_dependencies]]
  +[[cpp:publishing]]
   === Publishing 
   
   [NOTE]
  
positive.code: * Automatic discovery of popular tool chains (Visual C++, GCC, Clang).
  * Integration with https://gradle.com/build-scans/[build scans].
  
  [[cpp:tool-chain-support]]
  == Tool chain support
  
  Gradle offers the ability to execute the same build using different tool chains. When you build a native binary, Gradle will attempt to locate a tool chain installed on your machine that can build the binary. 
  
  The following tool chains are supported:
  
  [%header%autowidth,compact]
  |===
  | Operating System | Tool Chain | Notes
  
  | Linux
  | http://gcc.gnu.org/[GCC]
  |
  
  | Linux
  | http://clang.llvm.org[Clang]
  |
  
  | macOS
  | XCode
  | Uses the Clang tool chain bundled with XCode.
  
  | Windows
  | https://visualstudio.microsoft.com/[Visual C++]
  | Windows XP and later, Visual C++ 2010 to 2017.
  
  | Windows
  | http://gcc.gnu.org/[GCC] with http://cygwin.com[Cygwin 32 and Cygwin 64]
  | Windows XP and later.
  
  | Windows
  | http://gcc.gnu.org/[GCC] with http://www.mingw.org/[MinGW] and https://mingw-w64.org/doku.php[MinGW64]
  | Windows XP and later.
  |===
  
  
  [[cpp:tool_chain_installation]]
  == Tool chain installation
  
  To build C++ projects, you will need to have a compatible tool chain installed:
  
  === Windows
  
  To build on Windows, install a compatible version of Visual Studio. The C++ plugins will discover the Visual Studio installations and select the latest version. There is no need to mess around with environment variables or batch scripts. This works fine from a Cygwin shell or the Windows command-line.
  
  Alternatively, you can install Cygwin with GCC or MinGW. Clang is currently not supported.
  
  === macOS
  
  To build on macOS, you should install XCode. The C++ plugins will discover the XCode installation using the system PATH.
  
  The native plugins also work with GCC and Clang bundled with Macports. To use one of the Macports tool chains, you will need to make the tool chain the default using the `port select` command and add Macports to the system PATH.
  
  === Linux
  
  To build on Linux, install a compatible version of GCC or Clang. The C++ plugins will discover GCC or Clang using the system PATH.
  
  [[cpp:component_and_binaries]]
  == C++ components and binaries
  
  Unlike the <<<native_software.adoc#native_binaries,software model C++ plugins>>, the new C++ plugins rely on a familiar DSL and configuration model. 
  
  When the C++ plugin is applied to the project, 
  
  [[cpp:incremental_compilation]]
  == Incremental Compilation
  
negative.code: [[cpp:building_an_application]]
  == Building an application
  
  Apply the `cpp-application` plugin. 
  You can configure a link:{javadocPath}/org/gradle/language/cpp/CppApplication.html[CppApplication] in a `application` block.
  
  By default, when building a C++ application, the project name will be used as the name of the executable. For Windows, `.exe` will be added.
  
  https://github.com/gradle/native-samples/tree/master/cpp/application[See a sample].
  
  [[cpp:building_a_library]]
  == Building a library
  
  Apply the `cpp-library` plugin. 
  You can configure a link:{javadocPath}/org/gradle/language/cpp/CppLibrary.html[CppLibrary] in a `library` block. 
  
  By default, when building a C++ library, the project name will be used as the name of the library. Depending on the operating system, Gradle will add `.so`, `.dylib` or `.dll` for shared libraries or `.a` or `.lib` for static libraries. Gradle will assume you only want a shared library unless otherwise configured.
  
  https://github.com/gradle/native-samples/tree/master/cpp/simple-library[See a sample]. 
  
  If you only want static libraries, https://github.com/gradle/native-samples/tree/master/cpp/static-library[you can do that too].
  
  [[cpp:cpp_sources]]
  == C++ source layout
  
  By default, Gradle assumes a C++ library or application's sources are in `src/main/cpp`. 
  
  For a library, Gradle assumes its public headers are in `src/main/public`. Header files can be mixed into `src/main/cpp`, but these headers will be treated as private and not exposed to downstream consumers.
  
  Gradle assumes C++ source files end in `.cpp`, `.c+\+` or `.cc`. 
  
  [[cpp:declaring_dependencies]]
  == Declaring dependencies
  