[Paraview] build ParaView git on Windows7 64bit + MSVC2010 with vtkPythonCore errors

Xunlei Wu xunlei at renci.org
Tue Feb 15 17:05:24 EST 2011


Hi Dave and All,
I got some progress in terms of building vtkPythonCore. I had Enthought's Python distribution ver 7.0.1 !!!64bit!!! initially. I have verified it is indeed a 64bit Python executable. The package comes with python27.lib and CMake did not blink and automatically set PYTHON_LIBRARY to that lib. However, during building, MSVC2010 kept reporting "python27.lib" cannot be found.
Now, the fun part, I uninstalled Enthought distribution and tried "Python 2.7.1 Windows X86-64 Installer" from
http://www.python.org/getit/
This time, MSVC2010 no longer complained about missing "python27.lib". I am left with errors like

Error    1          error LNK2001: unresolved external symbol __imp__invalid_parameter_noinfo_noreturn            C:\ParaViewGit_VS2010\VTK\Wrapping\Python\vtkPythonUtil.obj           vtkPythonCore

After a bit digging, the error has something to do std::vector. Here are the beginning lines of vtkPythonUtil.cxx

#include "vtkPythonUtil.h"
#include "vtkPythonOverload.h"

#include "vtkSystemIncludes.h"

#include "vtkObject.h"
#include "vtkSmartPointerBase.h"
#include "vtkWeakPointerBase.h"
#include "vtkVariant.h"
#include "vtkStdString.h"
#include "vtkUnicodeString.h"
#include "vtkWindows.h"
#include "vtkToolkits.h"

#include <vtksys/ios/sstream>
#include <vtkstd/map>
#include <vtkstd/vector>
#include <vtkstd/string>
#include <vtkstd/utility>
       ...

After I move "#include <vtkstd/vector>" to the top of the file, POW! vtkPythonCore is successfully built. So I guess #include <vector> in vtkstd/vector.h gets undefined somewhere by those headers listed before it. Not sure whether it is a bug for other people.

x



From: paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org] On Behalf Of Xunlei Wu
Sent: Sunday, February 13, 2011 7:31 PM
To: David Partyka
Cc: paraview at paraview.org
Subject: Re: [Paraview] build ParaView git on Windows7 64bit + MSVC2010 with vtkPythonCore errors

Hi David,
I am out of luck.
Just did a fresh CMake configure with PARAVIEW_ENABLE_PYTHON on and the same PYTHON_LIBRARY value. The errors from MSVC2010. Any other suggestions?
Best,
x

From: David Partyka [mailto:david.partyka at kitware.com]
Sent: Sunday, February 13, 2011 4:33 PM
To: Xunlei Wu
Cc: paraview at paraview.org
Subject: Re: [Paraview] build ParaView git on Windows7 64bit + MSVC2010 with vtkPythonCore errors

Hi Xunlei,

What do you have the PYTHON_LIBRARY cmake option set to? If you set that correctly then it should be able to link properly. For example this is what it is set to on my machine.

C:/Support/Python27-x32/libs/python27.lib

On Sun, Feb 13, 2011 at 11:46 AM, Xunlei Wu <xunlei at renci.org<mailto:xunlei at renci.org>> wrote:
Hello,
I am building Paraview from git source on a Windows7 64bit OS with MSVC2010. I have enabled
PARAVIEW_ENABLE_PYTHON and VTKMY_WRAP_PYTHON in my CMake. I also built Python 2.7.1 64bit from source so that I have both python27.lib and python27_d.lib available. However the core python related projects are failed to build in both Debug and Release builds. Then the effects just trickled down like crazy. Below are 3 major errors in Debug build I feel might be the primary errors. And I do link python27_d.lib for all of them. Please see the attached CMakeLists.txt for more details.

Error      6              error LNK1104: cannot open file 'python27.lib'                C:\ParaViewGit\Utilities\VTKPythonWrapping\Executable\LINK               vtkPVPythonInterpretor
Error      5              error LNK1104: cannot open file 'python27.lib'    C:\ParaViewGit\VTK\Wrapping\Python\LINK                vtkPythonCore
Error      3              error LNK1104: cannot open file 'python27.lib'    C:\ParaViewGit\VTK\Wrapping\LINK      vtkWrapPython

Would you please help me? Thanks a lot.

Best,
x

_______________________________________________
Powered by www.kitware.com<http://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 ParaView Wiki at: http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110215/9eace748/attachment-0001.htm>


More information about the ParaView mailing list