[vtkusers] Patch for vtk 5.0.1 (and probably later releases too)

Kleistereimer kleistereimer at gmx.de
Thu Oct 23 19:53:51 EDT 2008


the problem with not building the vtktiff.lib is that i use the same
library build for different projects. on other projects i need that
library, on the current project i dont. usualy it works to just dont
link these libraries. (for instance wxWidgets has a wxtiff.lib too,
which is not mangled and thus completely compatible/exchangeable with
the imagemagic tiff library for instance. no problems here..)

but thankyou for the suggestion!

anyway, the tiff library name mangling makes sense only if it is
complete. complete mangling works, and no mangling at all works.
incomplete mangling does not works.

the patch might save others a few hours (who happen to use the same
unusual configuration)
althought i would prefer no mangling at all.


just my single cent..
regards,
kl

David Cole wrote:
> You can try setting the advanced CMake configuration variable
> "VTK_USE_SYSTEM_TIFF" to ON. That should avoid building the VTK version
> of the TIFF library altogether and let you use your system TIFF library.
> 
> I have not tried this myself, but that's how it should work in theory.
> 
> HTH,
> David
> 
> 
> On Thu, Oct 23, 2008 at 4:18 PM, Kleistereimer <kleistereimer at gmx.de
> <mailto:kleistereimer at gmx.de>> wrote:
> 
>     hi!
> 
>     thankyou for this fine library!
> 
>     i found a small bug in the tiff library function name mangling of vtk.
> 
> 
>     vtk_tiff_mangle.h
>     + #define _TIFFBuiltinCODECS vtk__TIFFBuiltinCODECS
> 
> 
>     if i build vtk as static library, and link my project with "vtktiff.lib"
>     AND some other (original) tiff lib too, all SHOULD be fine because vtk
>     mangles the names of the tiff library. But i get the following error:
> 
>     CORE_RL_tiff_.lib(tif_codec.obj) : error LNK2005: __TIFFBuiltinCODECS
>     already in CORE_RL_tiff_.lib(tif_codec.obj) defined
> 
>     (CORE_RL_tiff_.lib is the tiff library from imagemagic)
> 
>     -> _TIFFBuiltinCODECS was forgotten in the vtk tiff mangling. see above
>     patch.
> 
> 
> 
>     of course this links in 2 tiff librarys. this wastes space! it would be
>     prefered to have NO mangling at all, this way one just could stop
>     linking against "vtktiff.lib", (or the other tiff lib) and all would be
>     fine. (symbols satisfied)
>     disatvantage: maybe another version (untested with vtk) of the tiff
>     library code might be linked in.
> 
>     regards,
>     kl
>     _______________________________________________
>     This is the private VTK discussion list.
>     Please keep messages on-topic. Check the FAQ at:
>     http://www.vtk.org/Wiki/VTK_FAQ
>     Follow this link to subscribe/unsubscribe:
>     http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 




More information about the vtkusers mailing list