[texworks] Building TeXworks on Windows using MinGW

Stefan Löffler st.loeffler at gmail.com
Sat Jun 13 12:05:31 CEST 2009


Hi,

On 2009-06-13 11:24, Alain Delmotte wrote:
> Stefan Löffler a écrit :
>> Hi,
>>
>> On 2009-06-12 21:37, Alain Delmotte wrote:
>>  
>>> I did install everything.
>>>
>>> Compiling hunspell went, I think, well; but there were warnings!
>>>     
>>
>> Warnings are OK ;). You should end up with
>> C:\texworks\hunspell-1.2.8\src\hunspell\.libs\libhunspell-1.2.a
>>   
>
> That's what I got (with other files in libs)
> I had to do it from the console of MSYS, because "./configure" doesn't
> make sense in a DOS prompt box

I know, that's why I said "run MSYS and type" ;). configure is a Linux
shell script and hence doesn't work in DOS. That's the whole reason why
we need MSYS in the first place.

> [KDE dirs looking fine]
>
> The texworks-mingw is parallel to the texworks for MSVC 2005; in fact
> I did first use the msvc directory for mingw, but after I created
> totally separated directories.

That's certainly the better option. It may work with mixed directories,
because MSVC and mingw are using different intermediary file formats
IIRC, but I certainly wouldn't count on it ;).

>> 4) What path does "qmake --version" give you? Is it the correct path to
>> your MinGW KDE libs (if it's not, you probably have to adjust your PATH
>> and/or KDELIBS environmental variables as documented on the KDE on
>> Windows page which is linked from the wiki).
>>   
>
> QMake version 2.01a
> Using Qt version 4.4.3 C:/Programmes/KDE/bin/../lib
>
> There it is (?) it should be KDE-mingw!
> So I renamed "qmake" into "min-qmake" and I could use "make", but with
> errors, see attached file for the output of compilation.

Yep, there it is. I was expecting something like that, happened to me,
too ;).
What you did is a working solution, but not really optimal. The proper
way of doing it would be following step 4 (and possibly 5) of
http://techbase.kde.org/Projects/KDE_on_Windows/Installation#Summary_of_Steps
which will most likely be pointing towards the msvc version of the KDE
libs (if you followed the wiki instructions when setting up msvc).

As for the problem with compiling: Googling reveals that this is also a
well-known problem and apparently a bug in the Qt include files. There
is a workaround posted at http://www.itworld2.com/qtcompilation.aspx
(scroll to the very bottom of the page) which unfortunately involves
hacking the source code again (I hoped to get rid of that ;)).

Some little extra info about the problem: For some reason I don't quite
understand, the Qt sources include some definitions that are also
included in the windows header files. Apparently (some of) these
declarations don't match, which leads the compiler to complain if both
are used simultaneously (as is the case in TW). In fact, there are two
different versions in the Qt header files from which one is chosen based
on certain circumstances (e.g. the compiler that is used). In this case,
it seems that the wrong one is chosen. That's why the workaround at the
link above simply comments that wrong one, thereby forcing the compiler
to use the right one.

I hope this workaround does what it's supposed to do (and doesn't
introduce further inconsistencies).

HTH
-Stefan


More information about the texworks mailing list