[PySide] Windows GIT Head build

42 views
Skip to first unread message

Jon Middleton

unread,
Nov 1, 2010, 4:06:58 PM11/1/10
to pys...@lists.openbossa.org
Hi,

I want to build pyside for windows as there are some fixes that I need
on the Git HEAD (see
http://stackoverflow.com/questions/4013615/how-to-provide-data-from-pyside-qabstractitemmodel-subclass-to-qml-listview),
here is a record of what I have done so far.

Basically everything works until the final step the "pyside" module
build step, I am not sure why this is failing, any help with this
would be great.

Building Pyside
First make sure that you have the following on your system, and make
sure they are part of your system PATH.

python = http://www.python.org/download/releases/2.6/
python libxml2 = http://users.skynet.be/sbi/libxml-python/
qt = http://qt.nokia.com/downloads/windows-cpp-vs2008
iscc = inno SETUP http://www.jrsoftware.org/isdl.php
nmake = C:\Program Files\Visual Studio 9.0\VC\bin
git = http://git-scm.com/download
cmake = http://www.cmake.org/cmake/resources/software.html
create package script:
http://qt.gitorious.org/pyside/packaging/blobs/master/windows/createpackage.js

From Lacko Roman on how to build:
I installed and compiled binaries with the Qt 4.7 for
VisualStudio2008, NOT Qt SDK. Qt SDK is compiled with MinGW.

Note, that the createpackage.js script must be run from Visual Studio
2008 Command Prompt.

The createpackage.js gets the source from
http://qt.gitorious.org/pyside then compiles, then creates an
installer using INNO setup.

so to run the createpackage.js open a command window and type
>cscript createpackage.js

Progress
The script successfully
1. gets the source from gitorious.org
2. builds, test and installs:
- apiextractor
- generatorrunner
- shiboken

It Fails to build “pyside” with 18 errors:

“Error 1 error PRJ0019: A tool returned an error code from "Running
generator for QtCore..
...
Error 18 error PRJ0019: A tool returned an error code from "Running
generator for QtTest..."

Running the generatorrunner manually with the following command:

C:\Qt\Temp\pyside\PySide\QtCore>C:\Qt\Temp\PySideInstall\bin\generatorrunner --g
eneratorSet=shiboken --enable-parent-ctor-heuristic --enable-pyside-extensions -
-enable-return-value-heuristic C:/Qt/Temp/pyside/build/PySide/global.h --include
-paths=C:/Qt/Temp/pyside/PySide;C:/Qt/4.7.0/include --typesystem-paths=C:/Qt/Tem
p/pyside/PySide; --output-directory=C:/Qt/Temp/pyside/build/PySide/QtCore --lice
nse-file=C:/Qt/Temp/pyside/PySide/QtCore/../licensecomment.txt C:/Qt/Temp/pyside
/PySide/QtCore/typesystem_core.xml --api-version=4.7

Displays the following error:
C:\Qt\Temp\PySideInstall\bin\generatorrunner: Error loading generatorset plugin:
Cannot load library C:/Qt/Temp/PySideInstall/lib/generatorrunner/shiboken_gener
ator: The specified module could not be found.

It looks like it is missing some files in
C:/Qt/Temp/PySideInstall/lib/generatorrunner/

I have uploaded all the generated files in PySideInstall directory as
it has been created on my system here:
http://www.syrris-support.com/Downloads/JMM/PySideInstall.zip

Any suggestions how to get this to work would be great.

Cheers,
Jon.

--
Jonathan Middleton
_______________________________________________
PySide mailing list
PyS...@lists.openbossa.org
http://lists.openbossa.org/listinfo/pyside

Roman Lacko

unread,
Nov 1, 2010, 6:27:21 PM11/1/10
to Jon Middleton, pys...@lists.openbossa.org
Hi Jon,

I uploaded my scripts I'm using to create the windows distribution packages.

This is my new how-to for buildnig the windows distributions from scratch:

1. Download and install prerequisities:
1.1 MS Visual Studio Express 2008
(http://www.microsoft.com/express/Downloads/)
1.2 CMake (http://www.cmake.org/files/v2.8/cmake-2.8.2-win32-x86.exe)
1.3 Git (only needed if You want to download latest sources from git
repostitories) (http://code.google.com/p/msysgit/downloads/detail?name=Git-1.7.3.1-preview20101002.exe&can=2&q=)
1.4 Python 2.6 or 2.7 (http://www.python.org/ftp/python/2.7/python-2.7.msi)

2. Download and unzip pyside package creator:
http://www.pyside.org/files/pkg/pyside-pkgsetup-0.4.2.zip
Note: the zip contains also the complete sources of PySide version
0.4.2, so You don't need to download the stable souces your self.

3. Run the create_package.py script:
For example, to build the binaries from stable sources (version
0.4.2) for Python 2.7 and Qt 4.7, run the script with parameters:
>c:\Python27\python.exe create_package.py --qmake=c:\Qt\4.7.0\bin\qmake.exe

To build the binaries from git:
>c:\Python27\python.exe create_package.py
--qmake=c:\Qt\4.7.0\bin\qmake.exe --download

To check the environment:
>c:\Python27\python.exe create_package.py
--qmake=c:\Qt\4.7.0\bin\qmake.exe --check-environ

To show help on all parameters:
>c:\Python27\python.exe create_package.py --help

4. After the successfull build, the final binary distribution can be
found in subfolder "dist".


Please let me know if You have any problems

Regards
-Roman

PS: This script can be also used to build the Linux binaries (tested
under Ubuntu), but the distribution creation part is not finished yet

2010/11/1 Jon Middleton <jon.mi...@blacktrace.com>:

Roman Lacko

unread,
Nov 1, 2010, 6:35:44 PM11/1/10
to Jon Middleton, pys...@lists.openbossa.org
Sorri a forgot that You must run the build script form Visual Studio
Command Prompt. Here is fixed verson of tutorial:

1. Download and install prerequisities:
1.1 MS Visual Studio Express 2008
(http://www.microsoft.com/express/Downloads/)
1.2 CMake (http://www.cmake.org/files/v2.8/cmake-2.8.2-win32-x86.exe)
1.3 Git (only needed if You want to download latest sources from git
repostitories) (http://code.google.com/p/msysgit/downloads/detail?name=Git-1.7.3.1-preview20101002.exe&can=2&q=)
1.4 Python 2.6 or 2.7 (http://www.python.org/ftp/python/2.7/python-2.7.msi)

2. Download and unzip pyside package creator:
http://www.pyside.org/files/pkg/pyside-pkgsetup-0.4.2.zip
Note: the zip contains also the complete sources of PySide version
0.4.2, so You don't need to download the stable souces your self.

3. Open [Visual Studio Command Prompt] from:
[Start Menu]\Programs\Microsoft Visual C++ 2008 Express
Edition\Visual Studio Tools

4. From [Visual Studio Command Prompt] run the create_package.py script:


For example, to build the binaries from stable sources (version
0.4.2) for Python 2.7 and Qt 4.7, run the script with parameters:
>c:\Python27\python.exe create_package.py --qmake=c:\Qt\4.7.0\bin\qmake.exe

To build the binaries from git:
>c:\Python27\python.exe create_package.py
--qmake=c:\Qt\4.7.0\bin\qmake.exe --download

To check the environment:
>c:\Python27\python.exe create_package.py
--qmake=c:\Qt\4.7.0\bin\qmake.exe --check-environ

To show help on all parameters:
>c:\Python27\python.exe create_package.py --help

5. After the successfull build, the final binary distribution can be


found in subfolder "dist".

2010/11/1 Roman Lacko <backup...@gmail.com>:

Dan Halbert

unread,
Nov 4, 2010, 5:57:44 PM11/4/10
to pys...@lists.openbossa.org

I have been trying to do a Windows build of the git head of Pyside, but have been having trouble.

 

1. I am using full Visual Studio 2008 (not Express)

2. I had to change create_package.py in pyside-pkgsetup-0.4.2 to use shell=True. Otherwise it could not find the git executable (which is in %PATH%). I am a little mystified why this worked for anyone else.

 

def run_process(*args):

p = subprocess.Popen(args, shell=True)   # was False

...

 

3. Now, with the latest git head as of a couple of hours ago, I get this error late in the build:

 

[ 99%] Building CXX object tests/pysidetest/CMakeFiles/pysidetest.dir/moc_testobject.cxx.obj
moc_testobject.cxx
C:\Documents and Settings\dhalbert\Desktop\pyside-pkgsetup-0.4.2\modules\pyside\build\tests\pysidetest\moc_testobject.cxx(46) : warning C4273: 'staticMetaObject' : inconsistent dll linkage
c:\documents and settings\dhalbert\desktop\pyside-pkgsetup-0.4.2\modules\pyside\build\tests\pysidetest\../../../tests/pysidetest/testobject.h(9) : see previous definition of 'public: static QMetaObject const TestObject::staticMetaObject'
C:\Documents and Settings\dhalbert\Desktop\pyside-pkgsetup-0.4.2\modules\pyside\build\tests\pysidetest\moc_testobject.cxx(46) : error C2491: 'TestObject::staticMetaObject' : definition of dllimport static data member not allowed

 

Any ideas why this is not working? I'm a bit stuck at the moment, as I'm hitting the 0.4.2 crash on termination that has many duplicate bugs in Bugzilla and need a later version. If 0.4.3 is imminent, I could wait for that. Does anyone publish nightly (or more often) Windows builds?

 

Thanks,

Dan

 

 

Hugo Parente Lima

unread,
Nov 4, 2010, 5:25:34 PM11/4/10
to pys...@lists.openbossa.org

You can call cmake with -DBUILD_TESTS=FALSE to avoid this error.

By the error message I would say it's an issue related to different behavior
of GCC and MSVC regarding to symbol visibility, as we don't test our code with
MSVC very often, but always before any release, this kind of error could occur
between releases.

--
Hugo Parente Lima
INdT - Instituto Nokia de Tecnologia

signature.asc

Roman Lacko

unread,
Nov 5, 2010, 4:27:02 PM11/5/10
to Dan Halbert, pys...@lists.openbossa.org
Hi,


2010/11/4 Dan Halbert <hal...@halwitz.org>:


> I have been trying to do a Windows build of the git head of Pyside, but have
> been having trouble.
>
>
>
> 1. I am using full Visual Studio 2008 (not Express)
>

this is no problem, any version of Visual Studio 2008 is supported

> 2. I had to change create_package.py in pyside-pkgsetup-0.4.2 to use
> shell=True. Otherwise it could not find the git executable (which is in
> %PATH%). I am a little mystified why this worked for anyone else.
>

Can You send me your %PATH% environment variable value so I can check
why the git was not found ?

>
>
> def run_process(*args):
>
> p = subprocess.Popen(args, shell=True)   # was False
>
> ...
>
>
>
> 3. Now, with the latest git head as of a couple of hours ago, I get this
> error late in the build:

although the test failes, the build should complete, because the test
compiling error is just printed to console and build continues:

print "Testing " + module[0] + "..."

if run_process("ctest") != 0:

print "Some " + module[0] + " tests failed!"


>
>
>
> [ 99%] Building CXX object
> tests/pysidetest/CMakeFiles/pysidetest.dir/moc_testobject.cxx.obj
> moc_testobject.cxx
> C:\Documents and
> Settings\dhalbert\Desktop\pyside-pkgsetup-0.4.2\modules\pyside\build\tests\pysidetest\moc_testobject.cxx(46)
> : warning C4273: 'staticMetaObject' : inconsistent dll linkage
> c:\documents and
> settings\dhalbert\desktop\pyside-pkgsetup-0.4.2\modules\pyside\build\tests\pysidetest\../../../tests/pysidetest/testobject.h(9)
> : see previous definition of 'public: static QMetaObject const
> TestObject::staticMetaObject'
> C:\Documents and
> Settings\dhalbert\Desktop\pyside-pkgsetup-0.4.2\modules\pyside\build\tests\pysidetest\moc_testobject.cxx(46)
> : error C2491: 'TestObject::staticMetaObject' : definition of dllimport
> static data member not allowed
>
>
>
> Any ideas why this is not working? I'm a bit stuck at the moment, as I'm
> hitting the 0.4.2 crash on termination that has many duplicate bugs in
> Bugzilla and need a later version. If 0.4.3 is imminent, I could wait for
> that. Does anyone publish nightly (or more often) Windows builds?
>
>
>
> Thanks,
>
> Dan
>
>
>
>
>

Dan Halbert

unread,
Nov 5, 2010, 5:10:36 PM11/5/10
to pys...@lists.openbossa.org
On Friday, November 5, 2010 4:27pm, "Roman Lacko" <backup...@gmail.com> said:
> 2010/11/4 Dan Halbert <hal...@halwitz.org>:

> > 2. I had to change create_package.py in pyside-pkgsetup-0.4.2 to use
> > shell=True. Otherwise it could not find the git executable (which is in
> > %PATH%). I am a little mystified why this worked for anyone else.
> >
>
> Can You send me your %PATH% environment variable value so I can check
> why the git was not found ?
 
Hi. My PATH is shown below. I see that git is really git.cmd, so it's probably messing up inside that script.
 
>>> subprocess.Popen(['git'], shell=False)
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python26\lib\subprocess.py", line 623, in __init__
errread, errwrite)
File "C:\Python26\lib\subprocess.py", line 833, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

>>> subprocess.Popen(['git'], shell=True)
<subprocess.Popen object at 0x00F28450>

>>> os.environ['PATH']
'C:\\Qt\\4.7.0\\bin;C:\\Python26\\Lib\\site-packages\\PyQt4\\bin;C:\\Program Files\\CollabNet\\Subversion Client;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\Program Files\\SecureCRT\\;C:\\Program Files\\MATLAB\\R2010a\\bin;C:\\Program Files\\GtkSharp\\2.12\\bin;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0;C:\\Program Files\\Common Files\\Roxio Shared\\DLLShared\\;C:\\Program Files\\Common Files\\Roxio Shared\\9.0\\DLLShared\\;C:\\Program Files\\Windows Imaging\\;C:\\Program Files\\QuickTime\\QTSystem\\;C:\\Program Files\\MATLAB\\MATLAB Compiler Runtime\\v710\\runtime\\win32;C:\\Python26;C:\\Program Files\\TortoiseSVN\\bin;C:\\Program Files\\TortoiseHg\\;C:\\Program Files\\CMake 2.8\\bin;C:\\Program Files\\Git\\cmd'

> > 3. Now, with the latest git head as of a couple of hours ago, I get this
> > error late in the build:
>
> although the test failes, the build should complete, because the test
> compiling error is just printed to console and build continues:
 

This seems to be a build of a test, not the test itself. The build stops after this error. Here is a more complete transcript. I have shortened the paths to make it easier to read:


 
[ 99%] Building CXX object tests/pysidetest/CMakeFiles/pysidetest.dir/moc_testobject.cxx.obj
moc_testobject.cxx

...\pysidetest\moc_testobject.cxx(46) : warning C4273: 'staticMetaObject' : inconsistent dll linkage
...\pysidetest\../../../tests/pysidetest/testobject.h(9) : see previous definition of 'public: static QMetaObject const TestObject::staticMetaObject'
...\pysidetest\moc_testobject.cxx(46) : error C2491: 'TestObject::staticMetaObject' : definition of dllimport static data member not allowed
...\pysidetest\moc_testobject.cxx(56) : warning C4273: 'TestObject::metaObject' : inconsistent dll linkage
...\pysidetest\../../../tests/pysidetest/testobject.h(9) : see previous definition of 'metaObject'
...\pysidetest\moc_testobject.cxx(61) : warning C4273: 'TestObject::qt_metacast' : inconsistent dll linkage
...\pysidetest\../../../tests/pysidetest/testobject.h(9) : see previous definition of 'qt_metacast'
...\pysidetest\moc_testobject.cxx(69) : warning C4273: 'TestObject::qt_metacall' : inconsistent dll linkage
...\pysidetest\../../../tests/pysidetest/testobject.h(9) : see previous definition of 'qt_metacall'
...\pysidetest\moc_testobject.cxx(87) : warning C4273: 'TestObject::idValue' : inconsistent dll linkage
...\pysidetest\../../../tests/pysidetest/testobject.h(19) : see previous definition of 'idValue'
...\pysidetest\moc_testobject.cxx(94) : warning C4273: 'TestObject::justASignal' : inconsistent dll linkage
...\pysidetest\../../../tests/pysidetest/testobject.h(20) : see previous definition of 'justASignal'
...\pysidetest\moc_testobject.cxx(100) : warning C4273: 'TestObject::staticMethodDouble' : inconsistent dll linkage
...\pysidetest\../../../tests/pysidetest/testobject.h(21) : see previous definition of 'staticMethodDouble'
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\program files\microsoft visual studio 9.0\vc\bin\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\program files\microsoft visual studio 9.0\vc\bin\nmake.exe"' : return code '0x2'
Stop.
Traceback (most recent call last):
File "create_package.py", line 360, in main
compile_module(module)
File "create_package.py", line 175, in compile_module
raise Exception("Error compiling " + module[0])
Exception: Error compiling pyside
None

Roman Lacko

unread,
Nov 5, 2010, 5:44:59 PM11/5/10
to Dan Halbert, pys...@lists.openbossa.org
2010/11/5 Dan Halbert <hal...@halwitz.org>:

> Hi. My PATH is shown below. I see that git is really git.cmd, so it's probably messing up inside that script.
>
> 'C:\\Qt\\4.7.0\\bin;C:\\Python26\\Lib\\site-packages\\PyQt4\\bin;C:\\Program Files\\CollabNet\\Subversion Client;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\Program Files\\SecureCRT\\;C:\\Program Files\\MATLAB\\R2010a\\bin;C:\\Program Files\\GtkSharp\\2.12\\bin;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0;C:\\Program Files\\Common Files\\Roxio Shared\\DLLShared\\;C:\\Program Files\\Common Files\\Roxio Shared\\9.0\\DLLShared\\;C:\\Program Files\\Windows Imaging\\;C:\\Program Files\\QuickTime\\QTSystem\\;C:\\Program Files\\MATLAB\\MATLAB Compiler Runtime\\v710\\runtime\\win32;C:\\Python26;C:\\Program Files\\TortoiseSVN\\bin;C:\\Program Files\\TortoiseHg\\;C:\\Program Files\\CMake 2.8\\bin;C:\\Program Files\\Git\\cmd'

The PATH was set by git installer or manually by You ?
Please change the path to C:\\Program Files\\Git\\bin in PATH.

I don't understand why the tests are building because i set the
-DBUILD_TESTS=False in create_script.py at line 160.

Regards
-Roman

Roman Lacko

unread,
Nov 5, 2010, 6:28:18 PM11/5/10
to Dan Halbert, pys...@lists.openbossa.org
Hi,

I uploaded the fixed version of pyside-pkgsetup-0.4.2.
Now subprocess.Popen() is called with shell=True in Windows platform.

Regards
-Roman


2010/11/5 Dan Halbert <hal...@halwitz.org>:

Dan Halbert

unread,
Nov 5, 2010, 8:41:00 PM11/5/10
to pys...@lists.openbossa.org
On 11/5/2010 5:44 PM, Roman Lacko wrote:
>> PATH:
>> ' ... C:\\Program Files\\Git\\cmd'

>
> The PATH was set by git installer or manually by You ?
> Please change the path to C:\\Program Files\\Git\\bin in PATH.

The git installer added that to PATH. I used the git installer mentioned
several days ago in this thread.

> I don't understand why the tests are building because i set the
> -DBUILD_TESTS=False in create_script.py at line 160.

I didn't know the tests weren't supposed to be built.
Thanks - this is very helpful! I will look at both of these Monday.

Dan

Dan Halbert

unread,
Nov 8, 2010, 2:54:31 PM11/8/10
to pys...@lists.openbossa.org
On Friday, November 5, 2010 6:28pm, "Roman Lacko" <backup...@gmail.com> said:
> I uploaded the fixed version of pyside-pkgsetup-0.4.2.

Thanks. I got this new version and am using it. I "git pull"'d everything again. Some issues remain.

1. I have installed libxml2 and libxslt from http://users.skynet.be/sbi/libxml-python/binaries/, but I still see the warnings below in the cmake output from apiextractor:

-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
-- Could NOT find LibXslt (missing: LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR)

** Is this serious? it does not seem to break the build immediately. I added the directory containing libxml2.dll and libxslt.dll to PATH, but that didn't help.

2. ** Also now the build is breaking earlier, in pyside. See below. It appears to be missing overload information for registerTimer. I thought this might be due to the libxml2/libxslt errors above, but I'm not sure why I wouldn't have seen this before. Also, I wanted to make sure the build was not broken, and so did a test build on Linux. That had no problems.


Scanning dependencies of target QtCore
[ 2%] Building CXX object PySide/QtCore/CMakeFiles/QtCore.dir/PySide/QtCore/qabstracteventdispatcher_wrapper.cpp.obj
qabstracteventdispatcher_wrapper.cpp
C:\Documents and Settings\dhalbert\Desktop\pyside-pkgsetup-0.4.2\modules\pyside\build\PySide\QtCore\PySide\QtCore\qabstracteventdispatcher_wrapper.cpp(999) : error C2660: 'QAbstractEventDispatcherWrapper::registerTimer' : function does not take 2 arguments


NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\program files\microsoft visual studio 9.0\vc\bin\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\program files\microsoft visual studio 9.0\vc\bin\nmake.exe"' : return code '0x2'
Stop.
Traceback (most recent call last):

File "create_package.py", line 363, in main
compile_module(module)
File "create_package.py", line 178, in compile_module

Dan Halbert

unread,
Nov 9, 2010, 10:22:06 AM11/9/10
to pys...@lists.openbossa.org
On Monday, November 8, 2010 2:54pm, "Dan Halbert" <hal...@halwitz.org> said:
> Scanning dependencies of target QtCore
> [ 2%] Building CXX object
> PySide/QtCore/CMakeFiles/QtCore.dir/PySide/QtCore/qabstracteventdispatcher_wrapper.cpp.obj
> qabstracteventdispatcher_wrapper.cpp
> ...pyside-pkgsetup-0.4.2\modules\pyside\build\PySide\QtCore\PySide\QtCore\qabstracteventdispatcher_wrapper.cpp(999)

> : error C2660: 'QAbstractEventDispatcherWrapper::registerTimer' : function does not take 2 arguments

I am still trying to do a Windows build, and am stuck on the error above, which does not fail in the Linux build.

In QAbstractEventDispatcher, registerTimer() is declared in an overloaded way:

int registerTimer(int interval, QObject *object);
virtual void registerTimer(int timerId, int interval, QObject *object) = 0;

Notice that one is virtual and one is not. The non-virtual one is implemented in the corresponding qabstracteventdispatcher.cpp file.

QAbstractEventDispatcherWrapper is a shiboken-generated subclass of QAbstractEventDispatcher, and declares registerTimer only as

virtual void registerTimer(int timerId, int interval, QObject * object);

The error above is due to these two lines:

(959) cppSelf = (QAbstractEventDispatcherWrapper*)Shiboken::Converter<QAbstractEventDispatcher* >::toCpp(self);
...
(999) int cppResult = cppSelf->registerTimer(cppArg0, cppArg1);

I don't know enough about shiboken and the vagaries of the generated C++ code to diagnose this. If anyone has any clues, I would be grateful. I am using full Visual Studio 2008 SP1, built against QT 4.7.0 and Python 2.6.6, and the latest git head PySide sources, as of yesterday.

Dan

Stefan

unread,
Nov 9, 2010, 5:27:13 PM11/9/10
to pys...@lists.openbossa.org
I'm also trying to build the latest pyside from GIT in windows using
visual studio 2008 (not express) partly using the createpackage.js. I
found some odd things:
1) I had to specify -G "NMake Makefiles" to force make to create a
Makefile and not a VS2010 or VS2008 solution.
2) Since "shiboken/tests/libsample/samplenamespace.h" contains an
"#ifndef _MSC_VER" to remove
"SampleNamespace::DerivedFromNamespace::SampleNamespace" I had to ifdef
away the usage of it in
"shiboken/tests/samplebinding/sample/sample_python.h".
3) I got loads of "ProtectedPolymorphicWrapperprotectedName_protected"
and "OtherDerivedWrapperclassName_protected" in
"shiboken/tests/samplebinding/sample", i.e. the class name got prepended
to the method name. Removing these makes it build and pass the tests.

Other than that I get the same error as Dan. Removing the case to call
"int registerTimer(int interval, QObject * object)" I get a little bit
further, but it fails on:

[ 2%] Building CXX object
PySide/QtCore/CMakeFiles/QtCore.dir/PySide/QtCore/qabstractitemmodel_wrapper.cpp.obj
qabstractitemmodel_wrapper.cpp
E:\dev\qt\pyside\build\pyside\PySide\QtCore\PySide\QtCore\qabstractitemmodel_wrapper.cpp(3394)
: error C2660: 'QAbstractItemModelWrapper::parent' : function does not
take 0 arguments

It seems to have a hard time differentiating between virtual and
non-virtual methods with the same name, e.g.:
virtual QModelIndex QAbstractItemModel::parent(const QModelIndex&
index ) const = 0
QObject* QObject::parent() const

and
int QAbstractEventDispatcher::registerTimer(int interval, QObject *
object)
virtual void QAbstractEventDispatcher::registerTimer(int timerId, int
interval, QObject * object) = 0

/Stefan

Dan Halbert

unread,
Nov 9, 2010, 5:45:57 PM11/9/10
to pys...@lists.openbossa.org
On Tuesday, November 9, 2010 5:27pm, "Stefan" <pys...@damp.homeip.net> said:
>
> Other than that I get the same error as Dan. Removing the case to call
> "int registerTimer(int interval, QObject * object)" I get a little bit
> further, but it fails on:
>
> [ 2%] Building CXX object
> PySide/QtCore/CMakeFiles/QtCore.dir/PySide/QtCore/qabstractitemmodel_wrapper.cpp.obj
> qabstractitemmodel_wrapper.cpp
> E:\dev\qt\pyside\build\pyside\PySide\QtCore\PySide\QtCore\qabstractitemmodel_wrapper.cpp(3394)
> : error C2660: 'QAbstractItemModelWrapper::parent' : function does not take 0 arguments
 
I have figured the essence of this error, at least for my case of QAbstractEventDispatcherWrapper: see below.
See http://stackoverflow.com/questions/1835988 for an explanation.

I have been staring at the Linux shiboken files, but don't see how they differ to make this not give the same erroron the Linux build. The test case below fails nicely on both g++ and VC++.

-----------------
class C {
public:
void foo() { }
virtual void foo(int a) = 0;
};

class CWrapper : C {
public:
// using C::foo; // Uncommenting this fixes the problem.
virtual void foo(int a) { }
};

void bar() {
CWrapper cw = CWrapper();
cw.foo();
}
-----------------

Reply all
Reply to author
Forward
0 new messages