<div>Hi Nils,</div><div><br></div>This is fixed in VTK 5.8 (git master). The problem is that you are, most likely, building VTK in Debug mode and using a Release version of Python. When this situation occurs we undefine _DEBUG when including python.h and then redefine it. But, by doing this, any headers python.h happens to include will also have _DEBUG undefined causing these link errors.<div>
<br></div><div>This is the fix.</div><div><br></div><div><a href="http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=7f3f750596a105d48ea84ebfe1b1c4ca03e0bab3" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=7f3f750596a105d48ea84ebfe1b1c4ca03e0bab3</a></div>
<div><br></div><div><a href="http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=7f3f750596a105d48ea84ebfe1b1c4ca03e0bab3" target="_blank"></a>In the case of 5.6.1 you can, build VTK in Release, build your own Debug Python or apply the above fix locally.<br>
<br><div class="gmail_quote">On Tue, Feb 22, 2011 at 10:17 AM, Ritter, Nils <span dir="ltr"><<a href="mailto:Nils.Ritter@medizin.uni-leipzig.de" target="_blank">Nils.Ritter@medizin.uni-leipzig.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="DE" link="blue" vlink="purple"><div><p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">Hi all,</span></font></p><p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"> </span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt">I’m trying to compile VTK with Python wrapping enabled. The Compilation seems to work but I get a linker error:</span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt"> </span></font></p><p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt">Fehler 1 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp___invalid_parameter_noinfo_noreturn" in Funktion ""public: class std::_Tree_const_iterator<class std::_Tree_val<class std::_Tmap_traits<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct _object *,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,struct _object *> >,0> > > & __thiscall std::_Tree_const_iterator<class std::_Tree_val<class std::_Tmap_traits<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct _object *,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,struct _object *> >,0> > >::operator++(void)" (??E?$_Tree_const_iterator@V?$_Tree_val@V?$_Tmap_traits@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAU_object@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAU_object@@@std@@@2@$0A@@std@@@std@@@std@@QAEAAV01@XZ)". C:\projects\build\VTK_for_VMTK\Common\vtkPythonUtil.obj</span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt"> </span></font></p><p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt">In the context of VTK and Python the only plausible operator++ I could find is the one in vtkPythonUtil.cxx around line 1498. It seems a STL map, a STL string and a pointer are used, therefore I have no idea why an iterator increment could fail here.</span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt"> </span></font></p><p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt">Is there a way to fix this?</span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt"> </span></font></p><p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt">Using Windows7 Pro 64bit, VTK 5.6.1, Python 2.7.1, VS2010 and CMake 2.8.4</span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt"> </span></font></p><p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt">Thanks in advance.</span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt"> </span></font></p><p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt">Sincerely,</span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt">Nils</span></font></p><p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt"> </span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt"> </span></font></p><p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt">--</span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt">Nils Ritter</span></font></p><p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt">Research Associate | Working Group – TIMMS</span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt"> </span></font></p><p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt">Universität Leipzig | Faculty of Medicine </span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt">Innovation Center Computer Assisted Surgery (ICCAS) </span></font></p><p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">Semmelweisstr. 14 </span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">D - 04103 Leipzig </span></font></p><p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">Germany</span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"> </span></font></p><p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">phone +49 (0) 341 97 – 12016</span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt">fax +49 (0) 341 97 – 12009</span></font></p><p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"><a href="mailto:Nils.Ritter@medizin.uni-leipzig.de" target="_blank"><font color="blue"><span lang="EN-US" style="color:blue">Nils.Ritter@medizin.uni-leipzig.de</span></font></a></span></font><span lang="EN-US"></span></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"><a href="http://www.iccas.de/iccas/people/personal_pages/ritter.html" target="_blank"><font color="blue"><span lang="EN-US" style="color:blue">www.iccas.de/iccas/people/personal_pages/ritter.html</span></font></a></span></font><span lang="EN-US"></span></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span lang="EN-US" style="font-size:11.0pt"> </span></font></p></div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>