# Native binaries: implicitHeaders, static/shared libraries and objective-c

**URL:** <https://discuss.gradle.org/t/native-binaries-implicitheaders-static-shared-libraries-and-objective-c/3127>\
**Category:** Old Forum Archive\
**Created:** [March 20, 2015, 12:14am UTC](https://discuss.gradle.org/t/native-binaries-implicitheaders-static-shared-libraries-and-objective-c/3127 "2015-03-20T00:14:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mputters](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/mputters/32/166_2.png) [@mputters](https://discuss.gradle.org/u/mputters)\
**Post date:** [March 20, 2015, 12:14am UTC](https://discuss.gradle.org/t/native-binaries-implicitheaders-static-shared-libraries-and-objective-c/3127/1 "2015-03-20T00:14:00Z")

</div>

Hello,

Multiple questions really, but somewhat remotely linked (upgraded to the latest Gradle version, so there have been some changes in the model):

1. what is the exact use of implicitHeaders (as opposed to exportedHeaders)?

Basically my sources are: - src/\<library\>/cpp (sources) - src/\<library\>/include (internal headers) - include/library (public/api headers)

I’m doing cpp.exportedHeaders.srcDir “include/${library}”, which adds the correct /I or -I flag, but cpp.implicitHeaders.srcDir “src/${library}/include” doesn’t seem to do anything as far as the generated options.txt file is concerned…

1. is there a way to have gradle only create static library versions of my components (NativeLibrarySpec) only, skipping the shared library variant?

This one is mostly because I have no use for shared libs in this project and it fills all gradle tasks/components outputs with lines I’d rather never see 🙂

1. how can I conditionally apply the objective-cpp plugin?

Basically in some of my libraries I have: - src/\<library\>/cpp (C++ sources) - src/\<library\>/objcpp (Objective-C++ sources)

In my Visual Studio solution, the .mm files are simply not built (obviously). Is there a way to mimick this behavior with Gradle? Basically I’d only want to build those when I’m targetting OS X or iOS… Right now I’m hitting a “Objective-C++ is not available on the Visual C++ toolchain” error.

Thanks

(and still great to see native support in Gradle)
