[PyKDE] Problem building PyQt on Windows
    Giovanni Bajo 
    rasky at develer.com
       
    Tue Feb  6 01:06:35 GMT 2007
    
    
  
On 05/02/2007 1.40, Javier Sanz wrote:
> Thanks for answering.
> 
> That line contains #include <QtCore/qiodevice.h>
> 
> On 2/5/07, *Giovanni Bajo* <rasky at develer.com 
> <mailto:rasky at develer.com>> wrote:
> 
>     On 02/02/2007 20.20, Javier Sanz wrote:
> 
>      >
>     E:/windows/Qt/4.2.2/include/QtCore/../../src/corelib/io/qfile.h:27:30:
>      > E:/windows/Qt/4.2.2/include/QtCore/QtCore/qiodevice.h: Invalid
>     argument
Uhm. The command line is this:
g++ -c -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT 
-DQT_DLL -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN 
-I"E:/windows/Qt/4.2.2/include/QtCore" -I"E:/windows/Qt/4.2.2/include/QtCore" 
-I"E:/windows/Qt/4.2.2/include" -I"E:/windows/Qt/4.2.2/include/ActiveQt" 
-I"release" -I"." -I"..\Qt\4.2.2\mkspecs\win32-g++" -o release\qtdirs.o qtdirs.cpp
which includes these:
-I"E:/windows/Qt/4.2.2/include/QtCore"
-I"E:/windows/Qt/4.2.2/include"
Now, when g++ process this include line:
#include <QtCore/qiodevice.h>
it looks like it gets confused. In fact, when it sticks this to the first 
include path:
"E:/windows/Qt/4.2.2/include/QtCore" + QtCore/qiodevice.h
it ends up with:
E:/windows/Qt/4.2.2/include/QtCore/QtCore/qiodevice.h
which is obviously invalid. *BUT* "E:/windows/Qt/4.2.2/include/QtCore/QtCore" 
does exist: it is a file (not a directory).
So, my wild guess is that g++ is getting confused. Probably a bug in the way 
include paths/files are handled. Now, to the real question: why this happens 
only to you?
One thing that I would start inspecting is where the forward slashes in the 
paths are coming from. I can't remember a single forward slash ("/") when I 
compile PyQt under Windows: I always see backward slash ("\") in my path. It 
*might* be that g++ is confused because of this (ok, it's really a WILD GUESS 
but let's start with something...).
Does qtdirs.mk contains forward slashes? If so, why does qmake generate 
forward slashes for you under Windows? If you manually edit the generated 
qdirs.mk.* and replace all forward slashes with backward slashes, and then run 
"mingw32-make -f qtdirs.mk release", does it compile?
-- 
Giovanni Bajo
    
    
More information about the PyQt
mailing list