Build VTK 8.1.1 on Windows vc12 - vtkPythonArgs.cxx Line 105 Error cannot convert from 'const char *' to 'char *

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Build VTK 8.1.1 on Windows vc12 - vtkPythonArgs.cxx Line 105 Error cannot convert from 'const char *' to 'char *

kmilo9999
Hello,

Compiling VTK 8.1.1 + python wrapper on visual studio 2013 throws this error:

error C2440: '=' : cannot convert from 'const char *' to 'char *' D:\VTK-8.1.1\Wrapping\PythonCore\vtkPythonArgs.cxx 105 1 vtkWrappingPythonCore

I installed Python 3.7 in a windows 10 pc.
I used cmake-gui to build the project.

I'll appreciate any help.

--
Kmilo

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Build VTK 8.1.1 on Windows vc12 - vtkPythonArgs.cxx Line 105 Error cannot convert from 'const char *' to 'char *

David Gobbi
It looks like the Python folks changed the PyUnicode_AsUTF8() function in Python 3.7.  This function used to return "char *" but in 3.7 it returns "const char *".

I'll start working on a patch for the VTK master branch, but for now your best option is to use Python 3.6.

 - David



On Tue, Jul 10, 2018 at 8:41 AM, Camilo Diaz <[hidden email]> wrote:
Hello,

Compiling VTK 8.1.1 + python wrapper on visual studio 2013 throws this error:

error C2440: '=' : cannot convert from 'const char *' to 'char *' D:\VTK-8.1.1\Wrapping\PythonCore\vtkPythonArgs.cxx 105 1 vtkWrappingPythonCore

I installed Python 3.7 in a windows 10 pc.
I used cmake-gui to build the project.

I'll appreciate any help.

--
Kmilo


_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Build VTK 8.1.1 on Windows vc12 - vtkPythonArgs.cxx Line 105 Error cannot convert from 'const char *' to 'char *

David Gobbi
See https://gitlab.kitware.com/vtk/vtk/issues/17350 for bug report and patches.
Thanks for bringing this issue to my attention.

 - David

On Tue, Jul 10, 2018 at 11:42 AM, David Gobbi <[hidden email]> wrote:
It looks like the Python folks changed the PyUnicode_AsUTF8() function in Python 3.7.  This function used to return "char *" but in 3.7 it returns "const char *".

I'll start working on a patch for the VTK master branch, but for now your best option is to use Python 3.6.

 - David



On Tue, Jul 10, 2018 at 8:41 AM, Camilo Diaz <[hidden email]> wrote:
Hello,

Compiling VTK 8.1.1 + python wrapper on visual studio 2013 throws this error:

error C2440: '=' : cannot convert from 'const char *' to 'char *' D:\VTK-8.1.1\Wrapping\PythonCore\vtkPythonArgs.cxx 105 1 vtkWrappingPythonCore

I installed Python 3.7 in a windows 10 pc.
I used cmake-gui to build the project.

I'll appreciate any help.

--
Kmilo



_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers