[vtkusers] Linker error Windows7 64bit Python wrapping enabled

David Partyka david.partyka at kitware.com
Tue Feb 22 10:37:31 EST 2011


Hi Nils,

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.

This is the fix.

http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=7f3f750596a105d48ea84ebfe1b1c4ca03e0bab3

<http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=7f3f750596a105d48ea84ebfe1b1c4ca03e0bab3>In
the case of 5.6.1 you can, build VTK in Release, build your own Debug Python
or apply the above fix locally.

On Tue, Feb 22, 2011 at 10:17 AM, Ritter, Nils <
Nils.Ritter at medizin.uni-leipzig.de> wrote:

> Hi all,
>
>
>
> I’m trying to compile VTK with Python wrapping enabled. The Compilation
> seems to work but I get a linker error:
>
>
>
> 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 at V?$_Tree_val at V?$_Tmap_traits at V?$basic_string at DU
> ?$char_traits at D@std@@V?$allocator at D@2@@std@@PAU_object@@U?$less at V
> ?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@@2 at V
> ?$allocator at U?$pair@$$CBV?$basic_string at DU?$char_traits at D@std@
> @V?$allocator at D@2@@std@@PAU_object@@@std@@@2@$0A@@std@@@std@@@std@
> @QAEAAV01 at XZ)".
> C:\projects\build\VTK_for_VMTK\Common\vtkPythonUtil.obj
>
>
>
> 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.
>
>
>
> Is there a way to fix this?
>
>
>
> Using Windows7 Pro 64bit, VTK 5.6.1, Python 2.7.1,  VS2010 and CMake 2.8.4
>
>
>
> Thanks in advance.
>
>
>
> Sincerely,
>
> Nils
>
>
>
>
>
> --
>
> Nils Ritter
>
> Research Associate | Working Group – TIMMS
>
>
>
> Universität Leipzig | Faculty of Medicine
>
> Innovation Center Computer Assisted Surgery (ICCAS)
>
> Semmelweisstr. 14
>
> D - 04103 Leipzig
>
> Germany
>
>
>
> phone  +49 (0) 341 97 – 12016
>
> fax         +49 (0) 341 97 – 12009
>
> Nils.Ritter at medizin.uni-leipzig.de
>
> www.iccas.de/iccas/people/personal_pages/ritter.html
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110222/3c5727e0/attachment.htm>


More information about the vtkusers mailing list