[vtkusers] Error in building VTKpython
Elvis Stansvik
elvis.stansvik at orexplore.com
Tue Feb 21 04:52:03 EST 2017
2017-02-13 19:02 GMT+01:00 Yichen He <yhe20 at sheffield.ac.uk>:
> Hi Elvis
>
> I used cmake-gui. I checked the PYTHON_LIBRARY in CMakeCache.txt
>
> which is: PYTHON_LIBRARY:FILEPATH=C:/Python27/libs/python27.lib
>
> Is this same as passing -DPYTHON_LIBRARY? Sorry for not very familiar with
> cmake. Thanks for answering my question
Sorry for the late response. Yes that's the same as passing
-DPYTHON_LIBRARY. Passing the .lib file like you do sounds right to
me, but I'm not 100% sure as I've never built on Windows (on Linux you
pass the .so file).
Maybe one of the VTK devs on Windows can jump in.
Elvis
PS. Keep the mailing list address in your replies so that everyone can
see, I added it back in this mail. DS.
>
> Best regards
> Yichen He
>
>
>
> On 10 February 2017 at 07:43, Elvis Stansvik <elvis.stansvik at orexplore.com>
> wrote:
>>
>> Den 9 feb. 2017 7:31 em skrev "Yichen He" <yhe20 at sheffield.ac.uk>:
>> >
>> > Hello everyone
>> >
>> > My VTK version is 7.1.0, python 2.7, cmake 3.7.2 with VS2015 Win64
>> > compiler. VS2015 under win10 64bits OS was used to build the solution.
>> >
>> > I am trying to build the vtkpython using the source code after I ticked
>> > the VTK_WRAP_PYTHON in cmake. Many error appeared in the building process
>> > which are mostly saying:
>> >
>> > LNK2001 unresolved external symbol __imp_PyString_FromString
>> > LNK2019 unresolved external symbol __imp_PyNumber_Divide referenced in
>> > function "struct _object
>> > While other parts were successfully built. May I ask what could be the
>> > cause of these errors
>>
>> I'm not sure, but since it's failing to find symbols from the Python
>> library during linking, perhaps you need to pass -DPYTHON_LIBRARY as well. I
>> think you should give it the path to the Python .lib file, but I haven't
>> built VTK on Windows so better double check that.
>>
>> Elvis
>>
>> >
>> > Thank you.
>> >
>> > Best regards
>> > Yichen He
>> >
>> > _______________________________________________
>> > 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:
>> > http://public.kitware.com/mailman/listinfo/vtkusers
>> >
>
>
More information about the vtkusers
mailing list