[Ctk-developers] GCC visibility flags?

Daniel Blezek daniel.blezek at gmail.com
Thu Jul 8 21:35:42 EDT 2010


Hi Sascha,

  I have link errors on my Mac.  Here's an example:

ld: warning: unsigned long const& std::min<unsigned long>(unsigned long const&, unsigned long const&)has different visibility (default) in /Users/blezek/Source/Isomics/CTK-make/CMakeExternals/Install/lib/libdcmimgle.a(didislut.cxx.o) and (hidden) in CMakeFiles/CTKDICOMCore.dir/moc_ctkDICOMQuery.cxx.o


I think this happens primarily because of templates and seems to be mainly confined to the DCMTK and Log4Qt projects.  How should I add this to the Externals?

Thanks,
-dan


On Jul 7, 2010, at 12:52 AM, Sascha Zelzer wrote:

> Hi Dan,
> 
> this is the closed issue for the change:
> 
> http://github.com/pieper/CTK/issues/closed#issue/10
> 
> I have not seen any linker wanings on my Linux machine yet, did you introduce new code (and what system are you running)?
> 
> The flags cannot easily be applied to external libraries, since symbols must be prefixed with the appropriate import/export specifiers in the .h files.
> 
> Best,
> Sascha
> 
> On 07/07/2010 04:12 AM, Daniel Blezek wrote:
>> Hi all,
>> 
>>   Can someone explain this code from the top level CTK CMakeLists.txt file?
>> 
>> #-----------------------------------------------------------------------------
>> # Set symbol visibility Flags
>> #
>> IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
>>   SET(VISIBILITY_CXX_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden")
>> ENDIF()
>> 
>> 
>> This causes all sorts of linker warnings because Log4Qt doesn't include the flag and CTK does.
>> 
>> Is this strictly necessary?  If so, can it be applied to the Externals as well?
>> 
>> Thanks,
>> -dan
>> 
>> --
>> Daniel Blezek
>> daniel.blezek at gmail.com
>> 
>> 
>> 
>> _______________________________________________
>> Ctk-developers mailing list
>> Ctk-developers at commontk.org
>> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers
>>   
> 
> _______________________________________________
> Ctk-developers mailing list
> Ctk-developers at commontk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers

--
Daniel Blezek
daniel.blezek at gmail.com






More information about the Ctk-developers mailing list