Working Qt4 with win32-msvc.net
Michael Drüing
michael at drueing.de
Thu Jun 30 16:34:56 CEST 2005
Hi,
> > I had to fix a few library issues:
> > In the Makefile.pro's for the tools, there's a line
> commented out that looks like this:
> > #win32:LIBS += libz.lib
> > remove the hash and compile (don't forget to qmake), then
> it'll work (of course you need libz.lib somewhere the
> compiler can find it)
>
> I didn't have to do this at all. Where is that Makefile.pro exactly?
The Makefile.pro is in src/tools/{rcc,uic}/
It seems to contain that entry that has just been commented out.
>
> > For the GUI library, I patched the Makefile.{Debug,Release}
> to include libz.lib and libpng.lib in the "LIBS=..." line. I
> didn't yet find out how to do it properly.
>
> I didn't check what was enabled in the lib yet, so far I'm
> using the same .qmake.cache as the win32-g++ binary
> distribution, and for that config I didn't have to touch
> makefiles either.
Yes, me too, I did "configure.exe -platform win32-g++", then unpacked the
two zipfiles and then I called "nmake" which did the rest. Except for the
linker errors on rcc, uic and QtGUI ("undefined symbol '_uncompress' etc.)
which I fixed by uncommenting that line.
> I did had to debug qmake a bit to get it to generate working
> makefiles, so I might have missed things required for other
> config options
Do you mean you had to change qmake source code for it to work? I didn't :-)
I used the default qmake which was built by running "nmake".
What problems did the makefiles have for you? I doubt Trolltech ships a
different version of qmake with their commercial product than they do with
Qt/GPL, so a patch to qmake should be unneccessary.
> > I also had to compile the qtmain.lib by creating a project
> > in the MSVC GUI and setting "Ignore default libraries" to
> > "true". Somehow this didn't work with the nmake compilation
> > and the resulting .lib files always generated double
> > definitions for bad_cast or something when they were linked
> > to a project.
>
> So, does this means you are using qmake -t vclib?
no. what does that do? ;-) (generate *.vcproj from *.pro I guess?)
> I haven't touched the vcproj generator yet :P
> It works building from the command line... but I had to do a
> nmake distclean to remove the Makefiles from win32-g++ and
> have them re-generated by my patched qmake.
no, I did the qtmain project myself (file->new project, then import the
.cpp/.h files, add custom build steps for MOC, add Qt .lib files, etc.)
I didn't try to build the tutorials on the command line, I guess that might
work.
All the other examples I tried (in demos/ and examples/) did work perfectly
when building from the command line, however that was after I updated the
nmake-generated qtmain.lib with the one from my project, so I don't know if
it would have worked otherwise.
>
> >
> > Oh, and for t14, I had to change the "Game Over" font from
> "Courier" to "Courier new" (canonfield.cpp line 179)
> otherwise the font looked retro-style ;-)
> >
>
> Mine looks exactly like the screenshot, is it taken after or
> before the change? Mine is unchanged. :)
It's after the change. I don't know, maybe it's just some font problem on my
Windows box that "Courier" is not available.
--Michael
More information about the kde-cygwin
mailing list