This may or may not be related to the recent post about PyQt and VTK, but I thought I'd start it in a different thread. I've also had trouble compiling VTK with VTK_WRAP_PYTHON_SIP. GUISupport/Qt/CMakeLists.txt assumes that the "-t" flag sent to sip should match the current Qt version. But from what I could find online, the "-t" flag does not correspond to the Qt version, but the API version that is being wrapped with sip. The actual value that should be used for the "-t" flag seems to be in PyQt's pyqtconfig.py:<div>
<br></div><div><div># These are installation specific values created when PyQt4 was configured.</div><div>_pkg_config = {</div><div>    'pyqt_bin_dir':      '/System/Library/Frameworks/Python.framework/Versions/2.6/bin',</div>
<div>    'pyqt_config_args':  '',</div><div>    'pyqt_mod_dir':      '/Library/Python/2.6/site-packages/PyQt4',</div><div>    'pyqt_modules':      'QtCore QtGui QtHelp QtMultimedia QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtWebKit QtXml QtXmlPatterns phonon QtDesigner',</div>
<div>    'pyqt_sip_dir':      '/System/Library/Frameworks/Python.framework/Versions/2.6/share/sip/PyQt4',</div><div>    'pyqt_sip_flags':    '-x VendorID -t WS_MACX -x PyQt_NoPrintRangeBug -t Qt_4_6_3 -x Py_v3 -g',</div>
<div>    'pyqt_version':      0x040704,</div><div>    'pyqt_version_str':  '4.7.4',</div><div>    'qt_data_dir':       '/usr/local/Qt4.7',</div><div>    'qt_dir':            '/',</div>
<div>    'qt_edition':        'free',</div><div>    'qt_framework':      1,</div><div>    'qt_inc_dir':        '/usr/include',</div><div>    'qt_lib_dir':        '/Library/Frameworks',</div>
<div>    'qt_threaded':       1,</div><div>    'qt_version':        0x040700,</div><div>    'qt_winconfig':      'shared'</div><div>}</div></div><div><br></div><div>Note the mismatch between the pyqt_sip_flags and pyqt_version_str. When I applied the following patch to explicitly set the flag to what is in pyqt_sip_flags, it worked with no errors:<div>
<div><br></div><div><div>--- a/GUISupport/Qt/CMakeLists.txt</div><div>+++ b/GUISupport/Qt/CMakeLists.txt</div><div>@@ -279,7 +279,8 @@ if(VTK_WRAP_PYTHON_SIP)</div><div>   elseif(Q_WS_MAC)</div><div>     set(SIP_FLAGS ${SIP_FLAGS} -t WS_MACX)</div>
<div>   endif()</div><div>-  set(SIP_FLAGS ${SIP_FLAGS} -t Qt_${QT_VERSION_MAJOR}_${QT_VERSION_MINOR}_0)</div><div>+  set(SIP_FLAGS ${SIP_FLAGS} -t Qt_4_6_3)</div><div>   set(SIP_FLAGS ${SIP_FLAGS}</div><div>     -I ${SIP_PYQT_DIR}</div>
<div>     -I ${CMAKE_CURRENT_SOURCE_DIR}</div>
<div><br></div><div>Anyone know why this mismatch exists? Should the CMakeLists file somehow extract this from pyqtconfig.py instead of assuming the versions match?</div><div><br></div><div>Jeff</div></div></div></div>