[Insight-users] Compiling ITKv4.2.1 with support for Pythonv2.7.3 using Visual Studio 2008 win32
Willi Huber
surfersparadise85-itk at yahoo.com
Tue Oct 30 09:59:31 EDT 2012
Dear Insight-Users,
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.
That time I ran into a lot of issues and discontinued.
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.
This time I got the following compiler or linker error:
itkZeroFluxNeumannPadImageFilterPython.cpp
itkWrapPadImageFilterPython.cpp
itkWarpImageFilterPython.cpp
itkVectorResampleImageFilterPython.cpp
itkTileImageFilterPython.cpp
itkSliceBySliceImageFilterPython.cpp
itkShrinkImageFilterPython.cpp
itkResampleImageFilterPython.cpp
itkRegionOfInterestImageFilterPython.cpp
itkPermuteAxesImageFilterPython.cpp
itkPasteImageFilterPython.cpp
itkOrientImageFilterPython.cpp
itkMirrorPadImageFilterPython.cpp
itkInterpolateImageFilterPython.cpp
itkFlipImageFilterPython.cpp
itkExpandImageFilterPython.cpp
itkCyclicShiftImageFilterPython.cpp
itkCropImageFilterPython.cpp
itkBSplineUpsampleImageFilterPython.cpp
itkBSplineDownsampleImageFilterPython.cpp
Code wird generiert...
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.
Ergebnisse Das Buildprotokoll wurde unter "file://c:\itkbin\Wrapping\Modules\ITKImageGrid\ITKImageGridPython.dir\Release\BuildLog.htm" gespeichert.
ITKImageGridPython - 1 Fehler, 0 Warnung(en)
I did the compilation of this example by hand with /bigobj as extra flag and voila it worked.
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.
In CMake/ITKSetStandardCompilerFlags.cmake I 've found a option that already made use of /bigobj whenever VS2005 is used or Win64 is enabled.
Since /bigobj is allowed after VS2005 I changed:
if(CMAKE_CL_64 OR CMAKE_COMPILER_2005)
set(ITK_REQUIRED_CXX_FLAGS "${ITK_REQUIRED_CXX_FLAGS} /bigobj")
endif()
to:
if(MSVC_VERSION GREATER 1400 OR MSVC_VERSION EQUAL 1400)
set(ITK_REQUIRED_CXX_FLAGS "${ITK_REQUIRED_CXX_FLAGS} /bigobj")
endif()
which might not be 100 percent correct but at least it does what I want it to do what I've checked with:
message("Flags are ${ITK_REQUIRED_CXX_FLAGS}")
which shows me:
Flags are /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR -W3 /bigobj
I assume the -W3 to be wrong and commented the generating line.
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.
What am I doing wrong?
Best regards,
Willi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121030/5e00f40b/attachment.htm>
More information about the Insight-users
mailing list