title Building PolyWorld on Windows (Failure?) user strick ip 216.218.244.6 vol 1 lock ******** I haven't succeeded yet on Windows. /i (See the other page for the Linux story: [[630]].) Polyworld needs Qt4. Qt4 is available both Open Source and as commercial code. The Open Source code for Windows only works with the MinGW compilers. The Open Source comes as either source, or as a compiled release. The compiled release seems incomplete; I cannot find anything usable as a "libGL.a" library. But the compiled release does offer to load MinGW for you when you install it; that is useful enough, that gdb on linux needs you to convert them to LF chars. you should do it. Then put C:/MinGW/bin in your PATH. Now I'm trying to compile the source for Qt4. I deleted the entire 'examples' directory because the ./configure thrashed on it. PolyWorld itself needs some things not provided in MinGW: the "rand48" functions; POSIX calls for link() and unlink(); mkdir() doesn't take second argument for mode; gettimeofday(); ... things like that. I'll try writing my own wrappers for "rand48" functions using the weaker "rand". I comment out the code that links & unlinks files. gettimeofday() will return mock results (adds 0.1 seconds on each call). Other random annoyances: /list( * Some of the PolyWorld source files use char 13 (CR) instead of char 10 (LF) for newlines. gdb on linux needs you to convert them to LF chars. /file 13to10.sh will fix those. * On windows, qmake puts lots of backslashes in the makefiles. Cygwin's /bin/sh hates those. So change them to normal slashes, except for those at end of line. In vi, I do this by (0) First kill any windows-style trailing CRs: /tt %s/^M// (you have to use control-V before control-M to type that ^M) (1) changing the finals ones to some silly word: /tt %s/\\$/XYzzY/ (2) change remaining backslashes to front: /tt %s/\\/\//g (3) change those sillywords to backslashes again: /tt %s/XYzzY/\\/ * /file fix-dos-file.txt is a script to do that for you. Notice the "tr" command has a CR (control-v control-m) inside the quote marks; it deletes all CRs. /tt sh -x fix-dos-file.txt ` find src -name Makefile\* ` * When I was trying to use the precompiled Qt4.0.1, I had to alter some #ifdefs in some file to claim I had some licenses. This didn't make sense to me; I accepted all this code under GPL, so how could I not be licensed to use something in it? But in the end I failed on this path (libGL.a missing). * When doing ming32-make, things kept breaking with an "undefined interface" when running the "moc" command. If I repeat the command that broke from my cygwin bash, outside of make, inside the correct directory, it would succeed. Then I could continue with the ming32-make. * I now think it's because the path name to my build directory was too long. It was /tt C:/cygwin/home/Administrator/build/qt-win-opensource-src-4.0.1 , which I didn't realize was unreasonable. That first part is normal for cygwin, and the long last name is what's inside the bundle from TrollTech. So I've moved it to /tt C:/qt401 * Oops, I was wrong, it still breaks. But executing the command that broke from OUTSIDE of MinGW's make -- from the cygwin bash shell -- still works to fix it. Grrrrr. * /b NEVER EVER EVER use a f*cking m*cr*s*ft box if you can ever help it. Why am I trying to build this? For the losers that run windows, so they can play with PolyWorld. But I feel like I'm wasting my time, with the w*nd*ws people fighting me every step of the way. * Here's what I'm talking about: /pre( C:/qt401/bin/moc.exe -DQT_SHARED -DQT_THREAD_SUPPORT -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_EDITION=QT_EDITION_DESKTOP -DQT_BUILD_CORE_LIB -DQT_MAKEDLL -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_DLL -DQT_NO_DEBUG -I"C:/qt401/include" -I"C:/qt401/include/QtCore" -I"tmp" -I"C:/qt401/src/corelib/global" -I"../3rdparty/zlib" -I"C:/qt401/include/ActiveQt" -I"tmp/moc/release_shared" -I"." -I"C:/qt401/mkspecs/win32-g++" -D__GNUC__ -DWIN32 kernel/qeventdispatcher_win_p.h -o tmp/moc/release_shared/moc_qeventdispatcher_win_p.cpp g++ -c -O2 -O2 -Wall -frtti -fno-exceptions -DQT_SHARED -DQT_THREAD_SUPPORT -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_EDITION=QT_EDITION_DESKTOP -DQT_BUILD_CORE_LIB -DQT_MAKEDLL -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_DLL -DQT_NO_DEBUG -I"C:/qt401/include" -I"C:/qt401/include/QtCore" -I"tmp" -I"C:/qt401/src/corelib/global" -I"../3rdparty/zlib" -I"C:/qt401/include/ActiveQt" -I"tmp/moc/release_shared" -I"." -I"C:/qt401/mkspecs/win32-g++" -o tmp/obj/release_shared/moc_qeventdispatcher_win_p.o tmp/moc/release_shared/moc_qeventdispatcher_win_p.cpp C:/qt401/bin/moc.exe -DQT_SHARED -DQT_THREAD_SUPPORT -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_EDITION=QT_EDITION_DESKTOP -DQT_BUILD_CORE_LIB -DQT_MAKEDLL -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_DLL -DQT_NO_DEBUG -I"C:/qt401/include" -I"C:/qt401/include/QtCore" -I"tmp" -I"C:/qt401/src/corelib/global" -I"../3rdparty/zlib" -I"C:/qt401/include/ActiveQt" -I"tmp/moc/release_shared" -I"." -I"C:/qt401/mkspecs/win32-g++" -D__GNUC__ -DWIN32 kernel/qwineventnotifier_p.h -o tmp/moc/release_shared/moc_qwineventnotifier_p.cpp g++ -c -O2 -O2 -Wall -frtti -fno-exceptions -DQT_SHARED -DQT_THREAD_SUPPORT -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_EDITION=QT_EDITION_DESKTOP -DQT_BUILD_CORE_LIB -DQT_MAKEDLL -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_DLL -DQT_NO_DEBUG -I"C:/qt401/include" -I"C:/qt401/include/QtCore" -I"tmp" -I"C:/qt401/src/corelib/global" -I"../3rdparty/zlib" -I"C:/qt401/include/ActiveQt" -I"tmp/moc/release_shared" -I"." -I"C:/qt401/mkspecs/win32-g++" -o tmp/obj/release_shared/moc_qwineventnotifier_p.o tmp/moc/release_shared/moc_qwineventnotifier_p.cpp C:/qt401/bin/moc.exe -DQT_SHARED -DQT_THREAD_SUPPORT -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_EDITION=QT_EDITION_DESKTOP -DQT_BUILD_CORE_LIB -DQT_MAKEDLL -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_DLL -DQT_NO_DEBUG -I"C:/qt401/include" -I"C:/qt401/include/QtCore" -I"tmp" -I"C:/qt401/src/corelib/global" -I"../3rdparty/zlib" -I"C:/qt401/include/ActiveQt" -I"tmp/moc/release_shared" -I"." -I"C:/qt401/mkspecs/win32-g++" -D__GNUC__ -DWIN32 codecs/qtextcodecplugin.h -o tmp/moc/release_shared/moc_qtextcodecplugin.cpp codecs/qtextcodecplugin.h:51: Error: Undefined interface mingw32-make[1]: *** [tmp/moc/release_shared/moc_qtextcodecplugin.cpp] Error 1 mingw32-make[1]: Leaving directory `c:/qt401/src/corelib' c:\MinGW\bin\mingw32-make.exe: *** [release-all] Error 2 Administrator@wal-qt1q0zhd6wb /c/qt401/src/corelib $ C:/qt401/bin/moc.exe -DQT_SHARED -DQT_THREAD_SUPPORT -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_EDITION=QT_EDITION_DESKTOP -DQT_BUILD_CORE_LIB -DQT_MAKEDLL -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_DLL -DQT_NO_DEBUG -I"C:/qt401/include" -I"C:/qt401/include/QtCore" -I"tmp" -I"C:/qt401/src/corelib/global" -I"../3rdparty/zlib" -I"C:/qt401/include/ActiveQt" -I"tmp/moc/release_shared" -I"." -I"C:/qt401/mkspecs/win32-g++" -D__GNUC__ -DWIN32 codecs/qtextcodecplugin.h -o tmp/moc/release_shared/moc_qtextcodecplugin.cpp Administrator@wal-qt1q0zhd6wb /c/qt401/src/corelib $ mingw32-make MAKE=mingw32-make ... and it continues ... /pre) I did the same command that broke -- I just pasted it into my shell -- and it worked. The problem is that there are a whole bunch of these. * OKAY, I've finally built the entire Qt401, and even got PolyWorld to compile and link! (BTW, i do think shortening the path to my qt directory helped -- I only had a couple dozen moc.exe's to do manually.) Now I've got the gcc compiler bug described here: http://lists.trolltech.com/qt4-preview-feedback/2005-05/thread01027-0.html When I run, it says "QWidget: Must construct a QApplication before a QPaintDevice". I'm using the verion of gcc that trolltech installed for me! (3.4.2 (mingw-special)). It's the exact same as the "current" MSYS directly from the mingw sourceforge site. Should I bother to try to hack around it? Go back to an OLDER version of mingw? /list) /subsection Files /list( * /file 13to10.sh * /file fix-dos-file.txt