[texworks] Building TeXworks on WinXP

Stefan Löffler st.loeffler at gmail.com
Tue Jan 13 16:03:37 CET 2009


Ah, we're getting closer ;).

On 2009-01-13 15:41, Alain Delmotte wrote:
> I realized that I had 2 qmake,... one in c:\programmes\QT\bin (this
> was for Linguist) and one in c:\program files\KDE\bin.
> After checking and finding Linguist in KDE, I uninstalled QT (and mingw).

Yeah, that can confuse Qt, especially when programs/libraries of
different versions are used. You may want to try running qmake without
the "-specs" option, if everything is set up correctly it _should_ work.

>> 1) Confirm that you have set KDEDIRS and PATH according to
> I also modified the path, not using %KDEDIRS% but the real c:\program
files\KDE, and qmake was fount.

Did you define KDEDIRS? It may be required by (some parts of) KDE on

>> 3) Depending on which directories you find in (2), run qmake in the
>> TeXworks source directory with the command (adjust paths as necessary)
>>   qmake -tp vc -spec C:\Program Files\KDE\mkspecs\win32-msvc2008
> Here I modified as:
> qmake -tp vc -spec C:\Progra~1\KDE\mkspecs\win32-msvc2008
> for the name problem inherited from DOS (space in "program files".)
> I could create the .vcproj file.
> But compilation in msvc crashed with (sorry I use French):
> ------ Début de la génération : Projet : TeXworks, Configuration :
> Release Win32 ------
> RCC res\resources.qrc
> 'C:\PROGRAM' n'est pas reconnu en tant que commande interne
> ou externe, un programme exécutable ou un fichier de commandes.
> Project : error PRJ0019: Un outil a retourné un code d'erreur à partir
> de "RCC res\resources.qrc"
> Le journal de génération a été enregistré à l'emplacement
> "file://c:\texworks\texworks\obj\BuildLog.htm"
> TeXworks - 1 erreur(s), 0 avertissement(s)
> ========== Génération : 0 a réussi, 1 a échoué, 0 mis à jour, 0 a été
> ignoré ==========
> I join the BuildLog.htm file.
> It looks like that again the problem is with the space in "program files".

I recognize this problem. I had it in a different context once. The
problem is that MSVC doesn't find the Qt resource compiler. I can offer
a few possible solutions:
1) Install KDE on Windows to a location that doesn't contain spaces
(from what you wrote I take it that the natural place in French Windows
would be C:\Programmes"? The installation notes on the web also give an
example without spaces: C:\KDE) Maybe simply moving the directory (and
adjusting KDEDIRS/PATH) does the trick.
2) Try
   qmake -tp vc -spec "C:\Program Files\KDE\mkspecs\win32-msvc2008"
3) Manually alter the created .vcproj file (it's a text file). I
wouldn't actually recommend this for permanent use but if everything
else fails replacing all instances of the wrong path with the right one
should do the trick at least for figuring out if the rest of the
building process succeeds.

One final note: whenever you adjust environmental variables
(KDEDIRS/PATH) you need to close and re-open all command prompt windows
for this to take effect.

Hope this helps.

More information about the texworks mailing list