Hi,all

I checked http://qt-project.org/wiki/BuildingPySideon_Windows and only Visual 
Studio is used to build PySide on Windows. But for some reason I have to use 
MinGW to build PySide.

I'm trying to build PySide on Windows with MinGW, with the following command:

c:\Python27\python.exe setup.py bdist_wininst --make-spec=mingw 
--qmake=c:\Qt\qt-4.8.4-mingw-x32\bin\qmake.exe

shiboken build should be OK, but QtCore failed with error:

[ 18%] Building CXX object 
PySide/QtCore/CMakeFiles/QtCore.dir/PySide/QtCore/point_wrapper.cpp.obj
g++.exe: 
D:\binding_project\PySide-1.1.2\pyside_build\py2.7-qt4.8.4-32bit-release\pyside\PySide\QtCore\PySide\QtCore\point_wrapper.cpp:
 No such file or directory
g++.exe: no input files
mingw32-make[2]: *** 
[PySide/QtCore/CMakeFiles/QtCore.dir/PySide/QtCore/point_wrapper.cpp.obj] Error 
1
mingw32-make[1]: *** [PySide/QtCore/CMakeFiles/QtCore.dir/all] Error 2
mingw32-make: *** [all] Error 2


the error is due to generator warning:

[  3%] 
Running generator for QtCore...
...
type 'POINT' is specified in typesystem, but not defined. This could 
potentially lead to compilation errors.


Then I tried to solve this problem. I found that:

Core/CMakeList.txt includes the following 5 lines

    if(ENABLE_WIN)
        set(SPECIFIC_OS_FILES
        ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/msg_wrapper.cpp
        ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/point_wrapper.cpp
    )


And in QtCore/typesystemcorewin.xml,with the following 6 lines

    <value-type name="POINT">
        <include file-name="wtypes.h" location="global"/>
    </value-type>
    <value-type name="MSG">
        <include file-name="wtypes.h" location="global"/>
    </value-type>


I think file "wtypes.h" may become the key point.

Then I searched the whole windows file system using kwyword “wtypes”, and 
located “wtypes.h” under "mingw/include/" .I opened this file, but found 
nothing related to "POINT". In another windows OS with VS2008 in it, I did the 
search again, "WTypes.h" is located under "Microsoft 
SDKs\Windows\v6.0A\Include". I opened this file, and found the defination of 
POINT and MSG.

I feel that the lack of defination in MinGW leads to the problem"type 'POINT' 
is specified in typesystem, but not defined". Then I found the defination of 
POINT under "mingw/include/windef.h"(the defination of POINT under 
"mingw/include/winuser.h"), I changed the file "QtCore/typesystemcorewin.xml":

REPLACE

    <value-type name="POINT">
        <include file-name="wtypes.h" location="global"/> 
    </value-type>


WITH

    <value-type name="POINT">
        <include file-name="windef.h" location="global"/> 
    </value-type>


Build again, but same problem occurred --"type 'POINT' is specified in 
typesystem, but not defined. "

I was stuck here. Can someone help me?

Many thanks.



Peng Feixiang
_______________________________________________
PySide mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/pyside

Reply via email to