mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mingw-cross-env-list] Qt library configuration


From: Mark Brand
Subject: [Mingw-cross-env-list] Qt library configuration
Date: Sat, 10 Oct 2009 18:07:19 +0200
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Hi,

I see that qt.make has been changed to use system libraries instead of
libraries packaged with the Qt sources. For reference:

>     cd '$(1)' && ./configure \
>         -opensource \
>         -confirm-license \
>         -xplatform win32-g++ \
>         -host-arch i386 \
>         -host-little-endian \
>         -little-endian \
>         -exceptions \
>         -static \
>         -prefix '$(PREFIX)/$(TARGET)' \
>         -prefix-install \
>         -bindir '$(1)'/bindirsink \
>         -plugin-sql-odbc \
>         -plugin-sql-psql \
>         -plugin-sql-sqlite \
>         -plugin-sql-mysql \
>         -script \
>         -opengl desktop \
>         -webkit \
>         -phonon \
>         -no-phonon-backend \
>         -accessibility \
>         -no-reduce-exports \
>         -no-rpath \
>         -make libs \
>         -nomake demos \
>         -nomake docs \
>         -nomake examples \
>         -system-sqlite \
>         -system-zlib \
>         -system-libtiff \
>         -system-libpng \
>         -system-libmng \
>         -system-libjpeg \
>         -continue

I think I understand the motivation for doing this, but maybe Volker
would like to comment on this.

I have a few random remarks and questions:

I'm not sure it makes sense to specify "plugin" and "system" for the
same library as is done for "sqlite". It appears to me that
"-system-sqlite" overrules "-plugin-sql-sqlite".  In any case, I had to
remove the QTPLUGIN from the pro file and the Q_IMPORT_PLUGIN from
main.cpp for "qsqlite".

There might be something to be said for sticking closer to the
configuration of the Qt MinGW binary distribution from Nokia, since that
would presumably make it more likely for cross building packages
intended for Qt on MinGW to "just work".  It also makes it less likely
the we find ourselves solving upstream problems.

The "-system-libpng" leads to the following link error when I build the
example program "sqldatawidgetmapper":

> i686-pc-mingw32-g++ -enable-stdcall-fixup -Wl,-enable-auto-import
> -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-subsystem,windows
> -mthreads -Wl -o release/sqlwidgetmapper.exe release/main.o
> release/window.o release/moc_window.o 
> -L"/home/brand/projects/mingw-cross-env/usr/i686-pc-mingw32/lib"
> -lmingw32 -lqtmain -lQtSql -lQtGui -lgdi32 -lcomdlg32 -loleaut32
> -limm32 -lwinmm -lwinspool -lpng.lib -lmsimg32 -lQtCore -lkernel32
> -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32
> /home/brand/projects/mingw-cross-env/usr/lib/gcc/i686-pc-mingw32/4.4.0/../../../../i686-pc-mingw32/bin/ld:
> cannot find -lpng.lib

Obviously "-lpng.lib" should not be ending up in the makefile. Also, we
are missing "-lz" needed because of the "-system-zlib". If we fix the
makefile with "-lpng -lz" then the build succeeds.

The question is why qmake generates this makefile.  We could go and look
for the answer, or we could take the attitude, at least for now, "don't
go looking for trouble by unnecessarily changing the defaults".  (The
"defaults" being in this case the configuration distributed by Nokia.)

Even if there are compelling reasons to change the defaults, to avoid
wasting a lot of effort on this, it be might be a good idea to wait for
the real Qt 4.6 release.

Would anyone care to comment on this?

regards,

Mark





reply via email to

[Prev in Thread] Current Thread [Next in Thread]