[ITK-dev] -fvisibility=hidden link warnings with GetMetaDataObjectTypeName()
Lowekamp, Bradley (NIH/NLM/LHC) [C]
blowekamp at mail.nih.gov
Tue Nov 29 10:23:50 EST 2016
You are right! I am surprised CMake does not generate warning about that.
Thank you for the suggestion:
https://github.com/SimpleITK/SimpleITK/pull/76
Brad
> On Nov 29, 2016, at 10:04 AM, Johnson, Hans J <hans-johnson at uiowa.edu> wrote:
>
> Brad,
>
> Is that command line correct?
>
> :BOOL=hidden ? Is that true, or false, or should it be :STRING=hidden ?
>
> Hans
>
>
> --
>
>
> On 11/29/16, 8:19 AM, "Insight-developers on behalf of Lowekamp, Bradley (NIH/NLM/LHC) [C]" <insight-developers-bounces at itk.org on behalf of blowekamp at mail.nih.gov> wrote:
>
> Thanks for the update, and the work to narrow your problem down.
>
> Just to let you know, another alternative to managing the flags is to use CMake preset property variables. When I build ITK for SimpleITK I apply (depending on the configuration) the following CMake options:
>
> -DCMAKE_C_VISIBILITY_PRESET:BOOL=hidden
> -DCMAKE_CXX_VISIBILITY_PRESET:BOOL=hidden
> -DCMAKE_VISIBILITY_INLINES_HIDDEN:BOOL=ON
>
> This seems to work well now. And CMake appears to append the option after on the programatic manipulation of the standard flag variables.
>
> HTH,
> Brad
>
>> On Nov 28, 2016, at 4:59 PM, Sean McBride <sean at rogue-research.com> wrote:
>>
>> On Fri, 25 Nov 2016 20:55:31 +0000, Lowekamp, Bradley (NIH/NLM/LHC) [C] said:
>>
>>> I presume you are compiling ITK with shared libraries?
>>
>> No, as static libraries.
>>
>>> Would you happen to have a minimal example of “MyOwnCode.cxx” that
>>> reproduces this warning?
>>
>> I reduced it to a very small Xcode project with only 1 source file. Then I continued to reduce it to just a command line invocation of clang and it stopped reproducing. :(
>>
>> I soon discovered that between Xcode 6.4 and 7.0 a bug seems to have been introduced where turning on "symbols hidden by default" in the GUI (aka "GCC_SYMBOLS_PRIVATE_EXTERN = YES") doesn't actually pass "-fvisibility=hidden" to clang!
>>
>> So, for my particular case at least, there is no ITK issue here. Sorry for the noise.
>>
>> Cheers,
>>
>> --
>> ____________________________________________________________
>> Sean McBride, B. Eng sean at rogue-research.com
>> Rogue Research www.rogue-research.com
>> Mac Software Developer Montréal, Québec, Canada
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-developers
>
>
More information about the Insight-developers
mailing list