Hi again,
I advanced a litle. PySide is now compiling under Windows 7 with
msvc2008 in release and also GeneratorRunner, Shiboken and APIExtractor.
Now, I'm following the example to create a hybrid C++/PySide app from
http://lynxline.com/superhybrids-part-2-now-qt-pyside/. I compiled the
Hybrid library but when I try to compile the hybridpy project I get
several errors below, which seems to be related to access qt protected
methods:
Thanks again/Bruno.
PS: My HibrydPy project is like this:
TEMPLATE = lib
QT += core gui
INCLUDEPATH += hybrid
INCLUDEPATH += ../hybrid
INCLUDEPATH += C:/Python27/include
INCLUDEPATH +=
C:/Users/tezine/Projetos/Wikios/pyside/packaging/setuptools/install-py2.7-qt4.7.2/include/shiboken
INCLUDEPATH+=C:/Users/tezine/Projetos/Wikios/pyside/packaging/setuptools/install-py2.7-qt4.7.2/include/PySide/QtCore
INCLUDEPATH+=C:/Users/tezine/Projetos/Wikios/pyside/packaging/setuptools/install-py2.7-qt4.7.2/include/PySide/QtGui
INCLUDEPATH+=C:/Users/tezine/Projetos/Wikios/pyside/packaging/setuptools/install-py2.7-qt4.7.2/include/PySide
#LIBS += -ldl
LIBS+=-LC:/Qt/4.7.2/lib -lQtGui -lQtCore
LIBS+= -LC:/Python27/libs/ -lpython27
LIBS +=
-LC:/Users/tezine/Projetos/Wikios/pyside/packaging/setuptools/install-py2.7-qt4.7.2/lib
-lpyside-python2.7 -lshiboken-python2.7
LIBS += -L../hybrid -lHybrid
LIBS+=
-LC:/Users/tezine/Projetos/Wikios/pyside/packaging/setuptools/modules/PySide/build/PySide/QtCore
-lQtCore
LIBS+=
-LC:/Users/tezine/Projetos/Wikios/pyside/packaging/setuptools/modules/PySide/build/PySide/QtGui
-lQtGui
TARGET = ../PyHybrid
HEADERS+= pyhybrid/mainwindow_wrapper.h \
pyhybrid/pyhybrid_python.h
SOURCES += pyhybrid/pyhybrid_module_wrapper.cpp \
pyhybrid/mainwindow_wrapper.cpp
c:\users\tezine\projetos\wikios\pyside\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\autodecref.h(87)
: warning C4522: 'Shiboken::AutoDecRef' : multiple assignment operators
specified
c:\users\tezine\projetos\wikios\pyside\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\autodecref.h(55)
: warning C4800: 'PyObject *const ' : forcing value to bool 'true' or
'false' (performance warning)
c:\users\tezine\projetos\wikios\pyside\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\conversions.h(146)
: warning C4100: 'pyObj' : unreferenced formal parameter
c:\users\tezine\projetos\wikios\pyside\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\conversions.h(147)
: warning C4100: 'pyobj' : unreferenced formal parameter
c:\users\tezine\projetos\wikios\pyside\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\conversions.h(266)
: warning C4800: 'long' : forcing value to bool 'true' or 'false'
(performance warning)
c:\users\tezine\projetos\wikios\pyside\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\conversions.h(296)
: warning C4100: 'value' : unreferenced formal parameter
c:\users\tezine\projetos\wikios\pyside\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\conversions.h(305)
: warning C4100: 'value' : unreferenced formal parameter
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\PySide\pyside.h(32)
: warning C4099: 'SbkObjectType' : type name first seen using 'struct'
now seen using 'class'
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\basewrapper.h(84)
: see declaration of 'SbkObjectType'
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\PySide\QtCore\pyside_qtcore_python.h(3103)
: warning C4100: 'pyObj' : unreferenced formal parameter
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\PySide\QtCore\pyside_qtcore_python.h(3113)
: warning C4100: 'cppobj' : unreferenced formal parameter
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\PySide\QtCore\pyside_qtcore_python.h(3189)
: warning C4100: 'pyObj' : unreferenced formal parameter
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\PySide\QtCore\pyside_qtcore_python.h(3195)
: warning C4100: 'pyObj' : unreferenced formal parameter
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\PySide\QtCore\pyside_qtcore_python.h(3634)
: warning C4100: 'pyObj' : unreferenced formal parameter
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\PySide\QtGui\pyside_qtgui_python.h(8574)
: warning C4100: 'pyObj' : unreferenced formal parameter
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\PySide\QtGui\pyside_qtgui_python.h(8584)
: warning C4100: 'cppobj' : unreferenced formal parameter
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\conversions.h(332)
: warning C4244: 'argument' : conversion from 'double' to 'const
__int64', possible loss of data
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\conversions.h(328)
: while compiling class template member function 'unsigned int
Shiboken::Converter_PyInt<PyIntEquiv>::toCpp(PyObject *)'
with
[
PyIntEquiv=unsigned int
]
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\conversions.h(346)
: see reference to class template instantiation
'Shiboken::Converter_PyInt<PyIntEquiv>' being compiled
with
[
PyIntEquiv=unsigned int
]
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\conversions.h(378)
: see reference to class template instantiation
'Shiboken::Converter_PyULongInt<T>' being compiled
with
[
T=unsigned int
]
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\conversions.h(372)
: warning C4244: 'return' : conversion from '__int64' to 'char',
possible loss of data
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\conversions.h(364)
: while compiling class template member function 'char
Shiboken::CharConverter<CharType>::toCpp(PyObject *)'
with
[
CharType=char
]
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\conversions.h(379)
: see reference to class template instantiation
'Shiboken::CharConverter<CharType>' being compiled
with
[
CharType=char
]
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\conversions.h(332)
: warning C4244: 'argument' : conversion from 'double' to 'const
__int64', possible loss of data
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\conversions.h(328)
: while compiling class template member function 'int
Shiboken::Converter_PyInt<PyIntEquiv>::toCpp(PyObject *)'
with
[
PyIntEquiv=int
]
..\..\packaging\setuptools\install-py2.7-qt4.7.2\include\shiboken\conversions.h(388)
: see reference to class template instantiation
'Shiboken::Converter_PyInt<PyIntEquiv>' being compiled
with
[
PyIntEquiv=int
]
link /LIBPATH:"c:\Qt\4.7.2\lib" /NOLOGO /INCREMENTAL:NO /DLL /MANIFEST
/MANIFESTFILE:"release\PyHybrid.intermediate.manifest" /OUT:PyHybrid.dll
@C:\Users\tezine\AppData\Local\Temp\PyHybrid.dll.8576.1872.jom
Creating library PyHybrid.lib and object PyHybrid.exp
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual bool __thiscall QMainWindow::event(class QEvent *)"
(?event@QMainWindow@@UAE_NPAVQEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QObject::timerEvent(class QTimerEvent
*)" (?timerEvent@QObject@@UAEXPAVQTimerEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QObject::childEvent(class QChildEvent
*)" (?childEvent@QObject@@UAEXPAVQChildEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QObject::customEvent(class QEvent *)"
(?customEvent@QObject@@UAEXPAVQEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QObject::connectNotify(char const *)"
(?connectNotify@QObject@@UAEXPBD@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QObject::disconnectNotify(char const
*)" (?disconnectNotify@QObject@@UAEXPBD@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::mousePressEvent(class
QMouseEvent *)" (?mousePressEvent@QWidget@@UAEXPAVQMouseEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::mouseReleaseEvent(class
QMouseEvent *)" (?mouseReleaseEvent@QWidget@@UAEXPAVQMouseEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::mouseDoubleClickEvent(class
QMouseEvent *)" (?mouseDoubleClickEvent@QWidget@@UAEXPAVQMouseEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::mouseMoveEvent(class
QMouseEvent *)" (?mouseMoveEvent@QWidget@@UAEXPAVQMouseEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::wheelEvent(class QWheelEvent
*)" (?wheelEvent@QWidget@@UAEXPAVQWheelEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::keyPressEvent(class QKeyEvent
*)" (?keyPressEvent@QWidget@@UAEXPAVQKeyEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::keyReleaseEvent(class
QKeyEvent *)" (?keyReleaseEvent@QWidget@@UAEXPAVQKeyEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::focusInEvent(class QFocusEvent
*)" (?focusInEvent@QWidget@@UAEXPAVQFocusEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::focusOutEvent(class
QFocusEvent *)" (?focusOutEvent@QWidget@@UAEXPAVQFocusEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::enterEvent(class QEvent *)"
(?enterEvent@QWidget@@UAEXPAVQEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::leaveEvent(class QEvent *)"
(?leaveEvent@QWidget@@UAEXPAVQEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::paintEvent(class QPaintEvent
*)" (?paintEvent@QWidget@@UAEXPAVQPaintEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::moveEvent(class QMoveEvent *)"
(?moveEvent@QWidget@@UAEXPAVQMoveEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::resizeEvent(class QResizeEvent
*)" (?resizeEvent@QWidget@@UAEXPAVQResizeEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::closeEvent(class QCloseEvent
*)" (?closeEvent@QWidget@@UAEXPAVQCloseEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QMainWindow::contextMenuEvent(class
QContextMenuEvent *)"
(?contextMenuEvent@QMainWindow@@UAEXPAVQContextMenuEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::tabletEvent(class QTabletEvent
*)" (?tabletEvent@QWidget@@UAEXPAVQTabletEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::actionEvent(class QActionEvent
*)" (?actionEvent@QWidget@@UAEXPAVQActionEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::dragEnterEvent(class
QDragEnterEvent *)" (?dragEnterEvent@QWidget@@UAEXPAVQDragEnterEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::dragMoveEvent(class
QDragMoveEvent *)" (?dragMoveEvent@QWidget@@UAEXPAVQDragMoveEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::dragLeaveEvent(class
QDragLeaveEvent *)" (?dragLeaveEvent@QWidget@@UAEXPAVQDragLeaveEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::dropEvent(class QDropEvent *)"
(?dropEvent@QWidget@@UAEXPAVQDropEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::showEvent(class QShowEvent *)"
(?showEvent@QWidget@@UAEXPAVQShowEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::hideEvent(class QHideEvent *)"
(?hideEvent@QWidget@@UAEXPAVQHideEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual bool __thiscall QWidget::winEvent(struct tagMSG *,long
*)" (?winEvent@QWidget@@UAE_NPAUtagMSG@@PAJ@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::changeEvent(class QEvent *)"
(?changeEvent@QWidget@@UAEXPAVQEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::inputMethodEvent(class
QInputMethodEvent *)"
(?inputMethodEvent@QWidget@@UAEXPAVQInputMethodEvent@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual bool __thiscall QWidget::focusNextPrevChild(bool)"
(?focusNextPrevChild@QWidget@@UAE_N_N@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::styleChange(class QStyle &)"
(?styleChange@QWidget@@UAEXAAVQStyle@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::enabledChange(bool)"
(?enabledChange@QWidget@@UAEX_N@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::paletteChange(class QPalette
const &)" (?paletteChange@QWidget@@UAEXABVQPalette@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::fontChange(class QFont const
&)" (?fontChange@QWidget@@UAEXABVQFont@@@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::windowActivationChange(bool)"
(?windowActivationChange@QWidget@@UAEX_N@Z)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall QWidget::languageChange(void)"
(?languageChange@QWidget@@UAEXXZ)
mainwindow_wrapper.obj : error LNK2001: unresolved external symbol
"public: virtual int __thiscall QWidget::metric(enum
QPaintDevice::PaintDeviceMetric)const "
(?metric@QWidget@@UBEHW4PaintDeviceMetric@QPaintDevice@@@Z)
PyHybrid.dll : fatal error LNK1120: 41 unresolved externals
--------------------------
Hi,
I already tried using the pre-compiled PySide version, but the problem
is that I wat to create a hybrid C++/PySide application and I'm using
the tutorial from http://lynxline.com/superhybrids-part-2-now-qt-pyside/.
The problem appears when I try to run the build.bat on Windows like below:
cd hybridpy
generatorrunner --debug-level=full --no-supress-warnings
--generatorSet=shiboken ../data/global.h
--include-paths=../hybrid;C:/Qt/4.7.2/include/QtCore
--typesystem-paths=../data;C:/Users/tezine/Projetos/Wikios/pyside/typesystem
--output-directory=. ../data/typesystem.xml
I get many errors like these below:
enum 'QMutex::RecursionMode' is specified in typesystem, but not declared
type 'QSettings' is specified in typesystem, but not defined. This
could potentially lead to compilation errors.
type 'QTextStream' is specified in typesystem, but not defined. This
could potentially lead to compilation errors.
enum 'QSystemSemaphore::SystemSemaphoreError' is specified in
typesystem, but not declared
enum 'Qt::ItemDataRole' is specified in typesystem, but not declared
type 'QDir' is specified in typesystem, but not defined. This could
potentially lead to compilation errors.
enum 'QLocale::NumberOption' is specified in typesystem, but not declared
type 'QFactoryInterface' is specified in typesystem, but not defined.
This could potentially lead to compilation errors
enum 'QAbstractFileEngine::FileTime' is specified in typesystem, but
not declared
enum 'Qt::HitTestAccuracy' is specified in typesystem, but not declared
enum 'QThread::Priority' is specified in typesystem, but not declared
type 'QXmlStreamAttributes' is specified in typesystem, but not
defined. This could potentially lead to compilation err
enum 'QMetaMethod::MethodType' is specified in typesystem, but not
declared
enum 'QTextStream::RealNumberNotation' is specified in typesystem, but
not declared
enum 'QProcess::ProcessChannel' is specified in typesystem, but not
declared
enum 'Qt::ShortcutContext' is specified in typesystem, but not declared
enum 'Qt::ScrollBarPolicy' is specified in typesystem, but not declared
enum 'Qt::TransformationMode' is specified in typesystem, but not declared
enum 'QPixmap::HBitmapFormat' is specified in typesystem, but not declared
enum 'Qt::ConnectionType' is specified in typesystem, but not declared
type 'QEvent' is specified in typesystem, but not defined. This could
potentially lead to compilation errors.
enum 'QAbstractAnimation::Direction' is specified in typesystem, but
not declared
enum 'Qt::WidgetAttribute' is specified in typesystem, but not declared
enum 'Qt::TextInteractionFlag' is specified in typesystem, but not
declared
enum 'QState::ChildMode' is specified in typesystem, but not declared
enum 'Qt::FocusPolicy' is specified in typesystem, but not declared
enum 'Qt::SizeMode' is specified in typesystem, but not declared
It seems that generatorrunner doesn't find the Qt headers even setting
the --include-paths=../hybrid;C:/Qt/4.7.2/include/QtCore
How can I solve this?
Thanks/Bruno.
Em 18/07/2011 18:49, Hugo Parente Lima escreveu:
On Monday 18 July 2011 18:39:58 Bruno Tezine wrote:
Hi,
I'm a Python newbie. I'm trying to compile PySide under Windows 7 with
MSVC2008 and Python2.7.
If you are a newbie, better forget about compiling your own version of PySide
and get the pre-compiled version[1].
Regards
[1] http://www.pyside.org/files/
I already compiled ApiExtractor, GeneratorRunner and Shiboken, but
whenever I run 'configure' under CMake Gui tool, I get the messages below:
Can anyone help? I get the same message running from
http://qt.gitorious.org/pyside/packaging script.
Thanks/Bruno.
Using default python: python2.7
CMake Error at C:/Program Files
(x86)/shiboken/lib/cmake/Shiboken-1.0.5/ShibokenConfig.cmake:5 (include):
include called with wrong number of arguments. Include only takes one file.
Call Stack (most recent call first):
CMakeLists.txt:9 (find_package)
Detected OS: win
CMake Error at CMakeLists.txt:149 (message):
Could not detect Python module installation directory.
Configuring incomplete, errors occurred!
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside