[ITK-dev] -fvisibility=hidden link warnings with GetMetaDataObjectTypeName()

Lowekamp, Bradley (NIH/NLM/LHC) [C] blowekamp at mail.nih.gov
Tue Nov 29 20:58:38 EST 2016


Sean,

One more question, if you have a moment:

What is the purpose or goal of adding the hidden visibility flag when building ITK with static libraries? What API are you trying to expose on your "Application"?

Thanks,
Brad
________________________________________
From: Sean McBride [sean at rogue-research.com]
Sent: Monday, November 28, 2016 4:59 PM
To: Lowekamp, Bradley (NIH/NLM/LHC) [C]
Cc: insight-developers at itk.org
Subject: Re: [ITK-dev] -fvisibility=hidden link warnings with GetMetaDataObjectTypeName()

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


More information about the Insight-developers mailing list