[ITK] Compilation of ITK with python wrapping on VS2017

Timothee Evain tevain at telecom-paristech.fr
Sun May 7 10:29:57 EDT 2017


Hi Dženan,

Thanks for the answer and links, I didn't found the earlier post.
Let's hope the first update for VS2017 will come soon !

Tim

----- Mail original -----
De: "Dženan Zukić" <dzenanz at gmail.com>
À: "Timothee Evain" <tevain at telecom-paristech.fr>
Cc: community at itk.org
Envoyé: Dimanche 7 Mai 2017 14:07:05
Objet: Re: [ITK] Compilation of ITK with python wrapping on VS2017

Hi Tim,

it is a known bug in VS2017. Earlier report
<http://itk-users.7.n7.nabble.com/ITK-users-ITK-Python-numpy-to-itk-image-and-viceversa-tp38067p38101.html>
on ITK list, and link
<http://itk-users.7.n7.nabble.com/ITK-users-ITK-Python-numpy-to-itk-image-and-viceversa-tp38067p38106.html>
to bug.

Regards,
Dženan Zukić, PhD, Senior R&D Engineer, Kitware (Carrboro, N.C.)

On Sat, May 6, 2017 at 11:20 AM, Timothee Evain <tevain at telecom-paristech.fr
> wrote:

> Hello everyone,
>
> I'm trying to compile ITK 4.11 with python wrapping through VisualStudio
> 2017.
> Build fails because every itk*CastXML and itk*Swig projects trigger a
> bunch of errors related to the xstring file of visual studio like this:
>
> [...]
> Error   G3F63BFAE       constexpr variable '_Memcpy_move_offset' must be
> initialized by a constant expression   ITKSpatialObjectsCastXML
> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\
> Tools\MSVC\14.10.25017\include\xstring 1905
> Error   G3F63BFAE       constexpr variable '_Memcpy_move_size' must be
> initialized by a constant expression     ITKSpatialObjectsCastXML
> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\
> Tools\MSVC\14.10.25017\include\xstring 1906
> [...]
>
> more detailed as:
>
> 4>C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/
> Tools/MSVC/14.10.25017/include\xstring(1905,26): error G3F63BFAE:
> constexpr variable '_Memcpy_move_offset' must be initialized by a constant
> expression
> 4>        static constexpr size_t _Memcpy_move_offset =
> offsetof(_Mydata_t, _Bx);
> 4>                                ^
>  ~~~~~~~~~~~~~~~~~~~~~~~~
> 4>C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/
> Tools/MSVC/14.10.25017/include\stdexcept:23:21: note: in instantiation of
> template class 'std::basic_string<char, std::char_traits<char>,
> std::allocator<char> >' requested here
> 4>                : _Mybase(_Message.c_str())
> 4>                                  ^
> 4>C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/
> Tools/MSVC/14.10.25017/include\xstring:1905:48: note: cast that performs
> the conversions of a reinterpret_cast is not allowed in a constant
> expression
> 4>        static constexpr size_t _Memcpy_move_offset =
> offsetof(_Mydata_t, _Bx);
> 4>                                                      ^
> 4>C:/Program Files (x86)/Windows Kits/10/Include/10.0.14393.0/ucrt\stddef.h:42:32:
> note: expanded from macro 'offsetof'
> 4>        #define offsetof(s,m) ((size_t)&reinterpret_cast<char const
> volatile&>((((s*)0)->m)))
> 4>
>
> 4>C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/
> Tools/MSVC/14.10.25017/include\xstring(1906,26): error G3F63BFAE:
> constexpr variable '_Memcpy_move_size' must be initialized by a constant
> expression
> 4>        static constexpr size_t _Memcpy_move_size = sizeof(_Mydata_t) -
> _Memcpy_move_offset;
> 4>                                ^
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 4>C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/
> Tools/MSVC/14.10.25017/include\xstring:1906:66: note: initializer of
> '_Memcpy_move_offset' is not a constant expression
> 4>        static constexpr size_t _Memcpy_move_size = sizeof(_Mydata_t) -
> _Memcpy_move_offset;
> 4>                                                                        ^
> 4>C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/
> Tools/MSVC/14.10.25017/include\xstring:1905:26: note: declared here
> 4>        static constexpr size_t _Memcpy_move_offset =
> offsetof(_Mydata_t, _Bx);
>
> Have the python wrapping been tested for compilation with latest standards
> (constexpr is C++11 if I remember well) ?
>
> Tim
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>


More information about the Community mailing list