[texworks] Compiling on windows with Mingw
Ignasi Furió
ignasi.furio at uib.cat
Sun Dec 13 21:55:30 CET 2009
El Sun, 13 Dec 2009 15:54:44 +0100, Stefan Löffler <st.loeffler at gmail.com>
vau escriure:
>
> OK, I tested it now, and it works. Here's what I did:
Thank you for testing.
> 1) Make sure you have 7-zip > 4.61 for opening tar.lzma
> 2) http://www.mingw.org/ and click on "Downloads". On the following page,
> open the "GCC Version 4" folder and the "Current Release" folder inside.
>> From there, download gcc-full-*-mingw32-bin-2.tar.lzma
> (gcc-full-4.4.0-mingw32-bin-2.tar.lzma at the time of writing). Open the
> contents with 7-zip and extract the folders to C:\MinGW, replacing
> existing
> files.
> 3) Rebuild hunspell
No problem until here.
> 4) Add the following lines to your TeXworks.pro (in the place where you
> edit
> it before):
> QT =
> LIBS += -lQtScript4 -lQtScriptTools4 -lQtXml4 -lQtGui4 -lQtCore4
I've included in win32 part which looks like
win32 { # paths here are specific to my setup
INCLUDEPATH += D:/KDE/include/poppler/qt4
INCLUDEPATH += D:/texworks/hunspell-1.2.8/src/hunspell
LIBS += -LD:/texworks/hunspell-1.2.8/src/hunspell/.libs
LIBS += -lpoppler-qt4
LIBS += -lhunspell-1.2
QT =
LIBS += -lQtScript4 -lQtScriptTools4 -lQtXml4 -lQtGui4 -lQtCore4
RC_FILE = res/TeXworks.rc
}
after qmake and mingw32-make the result shows things like:
....
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE
-DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
-DQT_NEEDS_QMAIN -I'../../kde/include' -I'src'
-I'../../KDE/include/poppler/qt4' -I'../hunspell-1.2.8/src/hunspell'
-I'../../kde/include/ActiveQt' -I'moc' -I'ui'
-I'../../kde/mkspecs/default' -o obj/main.o src/main.cpp
En el fitxer inclòs dès de src/main.cpp:22:
src/TWApp.h:25:24: error: QApplication: No such file or directory
src/TWApp.h:26:17: error: QList: No such file or directory
src/TWApp.h:27:19: error: QAction: No such file or directory
src/TWApp.h:28:21: error: QSettings: No such file or directory
...
It seems that some referenc to .h files is wrong or missing.
After that I've commented QT= line in TeXworks.pro. Now qmake generates a
Makefile.Release file where LIBS line contains
references to Qt4 libs and Qt. I've deleted these ones and leaved only Qt4
libs. Now I obtained TeXworks.exe into Release folder. It works if I
include all recommended dll in wiki page plus QtScript4 and QtScriptools4.
> 5) Rebuild Tw
>
> Of you confirm that this works, I'll update the guide.
I can confirm it works but with these parameters need to be adjusted to
obtain a correct makefile automatically.
Thank you very much for your help.
Ignasi
More information about the texworks
mailing list