<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div>Resolved the problem.</div><div>Lib vtkPythonCore was missing. Fixed in patch http://review.source.kitware.com/#/c/8460/</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;">Cheers,</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;">Willi</div><div><br></div><div><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;"> <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span
style="font-weight:bold;">Von:</span></b> Willi Huber <surfersparadise85-itk@yahoo.com><br> <b><span style="font-weight: bold;">An:</span></b> Matt McCormick <matt.mccormick@kitware.com> <br><b><span style="font-weight: bold;">CC:</span></b> "insight-users@itk org" <insight-users@itk.org> <br> <b><span style="font-weight: bold;">Gesendet:</span></b> 2:39 Samstag, 10.November 2012<br> <b><span style="font-weight: bold;">Betreff:</span></b> Re: [Insight-users] Compiling ITKv4.2.1 with support for Pythonv2.7.3 using Visual Studio 2008 win32<br> </font> </div> <br><div id="yiv2062265048"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 10pt;"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span>Hi Matt,</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color:
transparent; font-style: normal;"><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>thanks for your help.</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>This helped a lot. I did further improvement and will commit my changes I made today or tomorrow.</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>Now I got stuck here:</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="background-color:transparent;"><span><font face="arial, helvetica, sans-serif" size="2"><div
style="background-color:transparent;">4>------ Erstellen gestartet: Projekt: ITKVtkGluePython, Konfiguration: Release Win32 ------</div><div style="background-color:transparent;">4>Generating itkVTKImageToImageFilterPython.cpp, ../../../lib/itkVTKImageToImageFilterPython.py</div><div style="background-color:transparent;">4>Generating itkImageToVTKImageFilterPython.cpp, ../../../lib/itkImageToVTKImageFilterPython.py</div><div style="background-color:transparent;">4>Generating ITKVtkGluePython.cpp, ../../../lib/ITKVtkGluePython.py</div><div style="background-color:transparent;">4>Kompilieren...</div><div style="background-color:transparent;">4>itkVTKImageToImageFilterPython.cpp</div><div style="background-color:transparent;">4>itkImageToVTKImageFilterPython.cpp</div><div style="background-color:transparent;">4>ITKVtkGluePython.cpp</div><div style="background-color:transparent;">4>Code wird generiert...</div><div
style="background-color:transparent;">4>Verknüpfen...</div><div style="background-color:transparent;">4> Bibliothek "C:\itkbin\lib\Release\ITKVtkGluePython.lib" und Objekt "C:\itkbin\lib\Release\ITKVtkGluePython.exp" werden erstellt.</div><div style="background-color:transparent;">4>itkImageToVTKImageFilterPython.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: static struct _object * __cdecl vtkPythonUtil::GetObjectFromPointer(class vtkObjectBase *)" (__imp_?GetObjectFromPointer@vtkPythonUtil@@SAPAU_object@@PAVvtkObjectBase@@@Z)" in Funktion
"__wrap_itkImageToVTKImageFilterID2_GetOutput".</div><div style="background-color:transparent;">4>itkVTKImageToImageFilterPython.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: static struct _object * __cdecl vtkPythonUtil::GetObjectFromPointer(class vtkObjectBase *)" (__imp_?GetObjectFromPointer@vtkPythonUtil@@SAPAU_object@@PAVvtkObjectBase@@@Z)".</div><div style="background-color:transparent;">4>itkVTKImageToImageFilterPython.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: static class vtkObjectBase * __cdecl vtkPythonUtil::GetPointerFromObject(struct _object *,char const *)" (__imp_?GetPointerFromObject@vtkPythonUtil@@SAPAVvtkObjectBase@@PAU_object@@PBD@Z)" in Funktion "__wrap_itkVTKImageToImageFilterID2_SetInput".</div><div style="background-color:transparent;">4>C:\itkbin\lib\Release\_ITKVtkGluePython.pyd : fatal error LNK1120: 2 nicht
aufgelöste externe Verweise.</div><div style="background-color:transparent;">4>Das Buildprotokoll wurde unter "file://c:\itkbin\Wrapping\Modules\ITKVtkGlue\ITKVtkGluePython.dir\Release\BuildLog.htm" gespeichert.</div><div style="background-color:transparent;">4>ITKVtkGluePython - 4 Fehler, 0 Warnung(en)</div><div style="background-color:transparent;"><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; font-style: normal;">Since disabling VtkGlue isn't an option I would appreciate any help.</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; font-style: normal;"><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; font-style: normal;">Thanks in advance,</div><div style="background-color: transparent; color:
rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; font-style: normal;">Willi</div></font></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><br><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;margin-top:5px;padding-left:5px;"> <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">Von:</span></b> Matt McCormick <matt.mccormick@kitware.com><br> <b><span style="font-weight:bold;">An:</span></b> surfersparadise85-itk@yahoo.com <br><b><span style="font-weight:bold;">CC:</span></b> "insight-users@itk org" <insight-users@itk.org> <br> <b><span style="
font-weight:bold;">Gesendet:</span></b> 16:14 Dienstag, 30.Oktober 2012<br> <b><span style="font-weight:bold;">Betreff:</span></b> Re: [Insight-users] Compiling ITKv4.2.1 with support for Pythonv2.7.3 using Visual Studio 2008 win32<br> </font> </div> <br><div id="yiv2062265048">Hi Willi,<br><br><div class="yiv2062265048gmail_quote"><blockquote class="yiv2062265048gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font:inherit;" valign="top">
<div>some time ago I tried to compile ITK with the Support for Python using Visual Studio 2010 with Win64. I wanted to support 2,3,4 and 5 dimensions and all available datatypes. I committed some patches to get rid of some errors I've found.</div>
<div>That time I ran into a lot of issues and discontinued.<br></div></td></tr></tbody></table></blockquote><div><br>With your efforts and the efforts of some other community members, the Python wrapping on Windows is steadily improving. Note that it might still be some time before we will be able to do Visual Studio 2010, but VS2008 and MinGW are much improved. We now have a contributed VS2008 nightly dashboard build, which helps considerably.<br>
<br></div><blockquote class="yiv2062265048gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font:inherit;" valign="top">
<div>Now I started again compiling and wanted to use VS2008 with only win32. Again I added 4 and 5 dimensions to the standard 2 and 3 and I switched on all the available datatypes for Python support.</div></td></tr></tbody></table>
</blockquote><div><br>Switching on all the available datatypes is good for testing, but it does come with compilation time and library size overhead.<br><br>We have a patch for 4 dimensions on Windows here:<br><br> <a rel="nofollow" target="_blank" href="http://review.source.kitware.com/#/c/8161/">http://review.source.kitware.com/#/c/8161/</a><br>
</div><blockquote class="yiv2062265048gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font:inherit;" valign="top">
<div>This time I got the following compiler or linker error:<br></div>
<div>itkZeroFluxNeumannPadImageFilterPython.cpp</div>
<div>itkWrapPadImageFilterPython.cpp</div>
<div>itkWarpImageFilterPython.cpp</div>
<div>itkVectorResampleImageFilterPython.cpp</div>
<div>itkTileImageFilterPython.cpp</div>
<div>itkSliceBySliceImageFilterPython.cpp</div>
<div>itkShrinkImageFilterPython.cpp</div>
<div>itkResampleImageFilterPython.cpp</div>
<div>itkRegionOfInterestImageFilterPython.cpp</div>
<div>itkPermuteAxesImageFilterPython.cpp</div>
<div>itkPasteImageFilterPython.cpp</div>
<div>itkOrientImageFilterPython.cpp</div>
<div>itkMirrorPadImageFilterPython.cpp</div>
<div>itkInterpolateImageFilterPython.cpp</div>
<div>itkFlipImageFilterPython.cpp</div>
<div>itkExpandImageFilterPython.cpp</div>
<div>itkCyclicShiftImageFilterPython.cpp</div>
<div>itkCropImageFilterPython.cpp</div>
<div>itkBSplineUpsampleImageFilterPython.cpp</div>
<div>itkBSplineDownsampleImageFilterPython.cpp</div>
<div>Code wird generiert...</div>
<div>c:\itksrc\modules\core\common\include\itkimage.h(284) : fatal error C1128: Die Anzahl von Abschnitten hat das Formatierungslimit der Objektdatei überschritten: Kompilieren mit /bigobj.</div>
<div> Ergebnisse Das Buildprotokoll wurde unter "file://c:\itkbin\Wrapping\Modules\ITKImageGrid\ITKImageGridPython.dir\Release\BuildLog.htm" gespeichert.</div>
<div>ITKImageGridPython - 1 Fehler, 0 Warnung(en)<br></div>
<div>I did the compilation of this example by hand with /bigobj as extra flag and voila it worked.</div></td></tr></tbody></table></blockquote><div><br>Excellent! Good find.<br> <br></div><blockquote class="yiv2062265048gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font:inherit;" valign="top">
<div>Then I wanted to add the /bigobj flag to my CMake configuration so that it automatically is included and I can commit a patch for review.</div>
<div>In CMake/ITKSetStandardCompilerFlags.cmake I 've found a option that already made use of /bigobj whenever VS2005 is used or Win64 is enabled.</div>
<div>Since /bigobj is allowed after VS2005 I changed:<br></div>
<div>if(CMAKE_CL_64 OR CMAKE_COMPILER_2005)</div>
<div>set(ITK_REQUIRED_CXX_FLAGS "${ITK_REQUIRED_CXX_FLAGS} /bigobj")</div>
<div>endif()<br></div>
<div>to: <br></div>
<div> if(MSVC_VERSION GREATER 1400 OR MSVC_VERSION EQUAL 1400)</div>
<div> set(ITK_REQUIRED_CXX_FLAGS "${ITK_REQUIRED_CXX_FLAGS} /bigobj")</div>
<div> endif()<br></div>
<div>which might not be 100 percent correct but at least it does what I want it to do what I've checked with:</div>
<div>        </div>
<div>        message("Flags are ${ITK_REQUIRED_CXX_FLAGS}")<br></div>
<div>which shows me:<br></div>
<div>        Flags are /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR -W3 /bigobj<br></div>
<div>I assume the -W3 to be wrong and commented the generating line.</div>
<div>My problem is now that its not appearing in the final results of CMAKE_CXX_FLAGS although it is in the variable at the end of CMakeLists.txt in C:\itksrc which I checked with a message.<br></div></td></tr></tbody></table>
</blockquote><div><br>This may or may not be a problem.<br><br>To check on what flags are actually being passed to the compiler with my VS2008 Express Edition, I go to Tools -> Options -> Projects And Solutions -> Build and Run -> MSBuild project build output verbosity.<br>
<br>Looking forward to the patch!<br><br>Thanks,<br>Matt<br> <br></div></div>
</div><br><br> </div> </div> </blockquote></div> </div></div></div><br><br> </div> </div> </blockquote></div> </div></body></html>