PDA

View Full Version : Makefile moc path corrupted in WindowsXP Qt 4.4.2



khopper
27th September 2008, 18:10
Hi from a total newbie. I want to report a bug in Qt 4.4.2
I am trying to compile the qwt demo called "sliders.cpp"

The compile failed everytime trying to find Qt/4.4.2bin/moc.exe
because it missed a slash between the 4.4.2 and the bin.

I found the offending line in Makefile.debug
C:\Qt\4.4.2\bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 sliders.h -o

and corrected it manually to read
C:/Qt/4.4.2/bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 sliders.h -o

and now it compiles and executes perfectly on my WindowsXP/SP3 machine.

where is that error generated? how do I fix it? it seems that qmake is creating
the bad Makefile, but I am so new that I don't know how to fix or patch it :confused:

Please let me know how to fix this in my installation.
thanks,
Ken - Naperville, IL USA

spirit
27th September 2008, 18:19
did you set a path to "bin" directory correctly in PATH variable?

khopper
27th September 2008, 19:41
Hi Spirit, thank you very much for your kind reply. I just tried to build the new "edyuk" IDE and has the same "\" "/" problem in it's Makefile. I managed to fix it somehow :)

Here my PATH - does it look o.k.?
----------------------------------
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\Sys tem32\Wbem;C:\msys\1.0\bin;C:\MinGW;C:\MinGW\bin;C :\Qt\4.4.2\;C:\Qt\4.4.2\bin\;C:\Qt\4.4.2\lib;\.
---------------------------------

The strange thing is that it seems to have started when I upgraded to Qt 4.4.2. I never had a problem qmake -project; qmake; make with 4.4.1. I had a difficult time upgrading to 4.4.2 and could not find any automatic way to get NetBeans or Edyuk to ignore that 4.4.1 was still there in the Program Files section of the C: partition.

Ken

spirit
27th September 2008, 19:47
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\Sys tem32\Wbem;C:\msys\1.0\bin;C:\MinGW;C:\MinGW\bin;C :\Qt\4.4.2\;C:\Qt\4.4.2\bin\;C:\Qt\4.4.2\lib;\.

you should clean PATH variable.
at first create QTDIR variable and set value for it, e.g.


QTDIR=C:\Qt\4.4.2\

then put it to PATH variable, so it should look like


PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\Sys tem32\Wbem;C:\msys\1.0\bin;%QTDIR%\bin;%PATH%

khopper
27th September 2008, 22:49
Fixed!
Thank you dear Spirit.
I had to work with various QTDIR and QWTDIR and MINGW variables
and finally got a path that works consistently.

I thank you VERY MUCH for your patience and kind help.

I wish you and your family a very happy weekend,
Ken - USA :D