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

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

Re: [Mingw-cross-env-list] Configure options for qt


From: phep
Subject: Re: [Mingw-cross-env-list] Configure options for qt
Date: Thu, 14 Jan 2010 12:41:27 +0100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706)

Volker Grabsch a écrit :
> The "plugin stuff" is not needed on Debian, but also does no harm

Well ... no. If I compile in the debian environment (just reducing
QTPLUGIN to qsqlpsql since this does not seem necessary if I understand
you correctly) whith the "plugin stuff", here's what I get :

g++ -Wl,-O1 - o editor [... foo.o bar.o baz.o ...]  -L/usr/lib
-L/usr/lib/qt4/plugins/sqldrivers -lqsqlpsql -lQtSql -lQtGui -lQtCore
-lpthread
editor.o: In function `global constructors keyed to main':
editor.cpp:(.text+0x9): undefined reference to
`qt_plugin_instance_qsqlpsql()'
collect2: ld returned 1 exit status
make: *** [editor] Erreur 1

I think that for the moment I will wrap the problematic code in platform
directives.

> there. The main difference is that mingw-cross-env provides a Qt
> for static linking. That's why you need to be a bit more explicit
> on which plugins you use, because they won't be detected on runtime.

I think I understand.

> On the pro side, your *.exe file will contain the whole Qt stuff
> and all needed plugins.

Yes and that seems nice to me !

> BTW, you might want to compress your *.exe file with UPX.

I'll give it a try, thanks.

>> and then to tweak my cmake config to integrate all of this (for all
>> those tests I build an ad-hoc qmake configuration to avoid excessive
>> problems).
> 
> I don't think you need CMake for that. QMake already provides
> everything you need.

Would that be for this sole executable I would not have switched to
cmake (which ruined my preferred minimalistic approach) but there's more
than this executable sources in the tarball (Doxygen documentation,
tests, ...) and at the time we started this project I somehow missed the
documentation of QMAKE_EXTRA_TARGETS being told on some qt forum that
qmake was stuck to a "one target per directory" way-of-life which is
quite painful for testing. But you may be right and I probably should
reassess my position on this.

Thanks or all,

phep




reply via email to

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