<font size="2"><font face="verdana,sans-serif">I thought those two files are auto-generated. They are not. Adding the following to lines t</font></font>o itk_tiff_mangle.h solves t<font size="2"><font face="verdana,sans-serif">he problem:<br>
</font></font><div><font class="Apple-style-span" face="verdana, sans-serif"><br></font></div><div><font class="Apple-style-span" face="verdana, sans-serif"><div>#define _TIFFerrorHandlerExt itk__TIFFerrorHandlerExt</div>
<div>#define _TIFFwarningHandlerExt itk__TIFFwarningHandlerExt</div></font></div><div><font class="Apple-style-span" face="verdana, sans-serif"><br></font></div><div><font class="Apple-style-span" face="verdana, sans-serif">The other error (</font><span class="Apple-style-span" style="font-family: verdana, sans-serif; background-color: rgb(255, 255, 255); ">ITKgiftiio-4.0.lib</span>) went away with today's pull.</div>
<div><font class="Apple-style-span" face="verdana, sans-serif"><br></font><div class="gmail_quote">2011/9/13 Dženan Zukić <span dir="ltr"><<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<font size="2"><font face="verdana,sans-serif">Thanks for the hint Sean.<br></font></font><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">itk_tiff_mangle.h contains definitions such as these:</font></div>
<div><div><font face="'courier new', monospace">#define _TIFFerrorHandler itk__TIFFerrorHandler</font></div><div><font face="'courier new', monospace">#define _TIFFwarningHandler itk__TIFFwarningHandler</font></div>
<div style="font-family:verdana, sans-serif">and VTK version does the same just with vtk_ prefix.</div>
<div style="font-family:verdana, sans-serif"><br></div><div><font face="verdana, sans-serif">However, neither files mentions the offending symbols, </font><font face="'courier new', monospace">_TIFFerrorHandlerExt</font><font face="verdana, sans-serif"> and </font><font face="'courier new', monospace">_TIFFwarningHandlerExt</font><font face="verdana, sans-serif">.</font></div>
<div style="font-family:verdana, sans-serif"><br></div><div style="font-family:verdana, sans-serif">However, the command at the top of those files gives a hint that a generation of these _mangle.h files is somehow faulty:</div>
<div style="font-family:verdana, sans-serif"><span style="font-family:'courier new', monospace">/*</span></div><div><div><font face="'courier new', monospace">This header file mangles all symbols exported from the tiff library.</font></div>
<div><font face="'courier new', monospace">It is included in all files while building the tiff library. Due to</font></div><div><font face="'courier new', monospace">namespace pollution, no tiff headers should be included in .h files in</font></div>
<div><font face="'courier new', monospace">VTK.</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">The following command was used to obtain the symbol list:</font></div>
<div><i><font face="'courier new', monospace">nm libvtktiff.a |grep " [TRD] "</font></i></div><div><font face="'courier new', monospace">*/</font></div>
</div></div><div><font face="verdana, sans-serif"><br>
</font></div><div><font face="verdana, sans-serif">Since I know nothing about internals of TIFF library nor about the generation process of those files, I am pretty crippled when it comes to solving this issue. Any help will be appreciated.</font></div>
<div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">Regards,</font></div><div><font face="verdana, sans-serif">Dženan</font></div><div><div></div><div class="h5">
<div><font face="verdana, sans-serif"><br></font><div class="gmail_quote">On Mon, Sep 12, 2011 at 19:30, Sean McBride <span dir="ltr"><<a href="mailto:sean@rogue-research.com" target="_blank">sean@rogue-research.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Mon, 12 Sep <a href="tel:2011%2016" value="+49201116" target="_blank">2011 16</a>:47:35 +0200, Dženan Zukić said:<br>
<br>
>I just updated my ITK4 git repository (I had maybe a month old version<br>
>previously). ITK itself compiles without issues, but my project gets some<br>
>linking errors.<br>
><br>
>For Debug there is one error:<br>
>LINK : fatal error LNK1104: cannot open file<br>
>'D:\SDK\ITK4build\lib\Debug\ITKgiftiio-4.0.lib'<br>
<br>
</div>That looks like a different problem.<br>
<div><br>
>For Release these two errors appear:<br>
>itktiff-4.0.lib(tif_error.obj) : error LNK2005: _TIFFerrorHandlerExt already<br>
>defined in vtktiff.lib(tif_error.obj)<br>
>itktiff-4.0.lib(tif_warning.obj) : error LNK2005: _TIFFwarningHandlerExt<br>
>already defined in vtktiff.lib(tif_warning.obj)<br>
<br>
</div>If you check your VTK and ITK source trees for files with the name 'mangle' you'll find:<br>
<br>
vtk_tiff_mangle.h<br>
itk_tiff_mangle.h<br>
<br>
They use preprocessor magic to change the symbol names of libTIFF functions to prevent the exact problem you are seeing. I suspect something is missing from one of both of those files. If you find it, a patch would be nice!<br>
<br>
Cheers,<br>
<font color="#888888"><br>
--<br>
____________________________________________________________<br>
Sean McBride, B. Eng <a href="mailto:sean@rogue-research.com" target="_blank">sean@rogue-research.com</a><br>
Rogue Research <a href="http://www.rogue-research.com" target="_blank">www.rogue-research.com</a><br>
Mac Software Developer Montréal, Québec, Canada<br>
</font></blockquote></div><br></div>
</div></div></blockquote></div><br></div>