[ITK-dev] Insight-developers Digest, Vol 151, Issue 16

Matt McCormick matt.mccormick at kitware.com
Mon Nov 14 18:16:40 EST 2016


On Sat, Nov 12, 2016 at 12:22 PM, Simon Warfield
<simon.warfield at childrens.harvard.edu> wrote:
> On 11/12/16 12:00 PM, insight-developers-request at itk.org wrote:
>>
>>
>> Here are the tests:
>>
>>
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__review.source.kitware.com_-23_c_21755_&d=DQICAg&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=spboX-Qn5Dn-uyspT__O0BtpSEF5erHIiRAwdzSaa_QAQ58afxHcHSMuB76pSgfl&m=M-IiPEMMeqHF1XHRKIyX7e1SrEaHJUjru2T5LMeNq48&s=e1f60RJqOXt5tQ7np0HYJNJAW7V0q3QiRYCHKw9CV_U&e=
>>
>> where reasonable export specification is added in both ITK and the
>> client libraries. But, dynamic_cast fails on OSX:
>>
>>
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__open.cdash.org_testDetails.php-3Ftest-3D499059765-26build-3D4637669&d=DQICAg&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=spboX-Qn5Dn-uyspT__O0BtpSEF5erHIiRAwdzSaa_QAQ58afxHcHSMuB76pSgfl&m=M-IiPEMMeqHF1XHRKIyX7e1SrEaHJUjru2T5LMeNq48&s=Fh8PMzdqTGvkcjXgnHusVcl_L6j6tMu22QGt88eXt6w&e=
>>
>>
>> Matt
>
>
> The document here: http://www.russellmcc.com/posts/2013-08-03-rtti.html ,
> says this should work if all of the classes are appropriately marked as
> 'default' and that the linker will give a fatal warning if this is not the
> case.
>
> Where does the test code mark the classes shared across the dylib boundaries
> as 'default' rather than 'hidden' ?

The client libraries are marked as default using the _EXPORT macros.
For example:

   class ClientTestLibraryA_EXPORT ITKObjectProducer

The ClientTestLibraryA_EXPORT macro is defined in ClientTestLibraryAExport.h:

  #      define ClientTestLibraryA_EXPORT __attribute__((visibility("default")))


However, the issue is with the itk::Image< float, 3 > type, which is
implicitly instantiated.


> What does the OS X linker say about the code when fatal warnings are turned
> on ?

The OSX linker does not throw any warnings in the test case provided
because of implicit instantiation.


OSX is an important platform to support, and we must also support
implicit instantiation.


Thanks,
Matt


More information about the Insight-developers mailing list