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: Mark Brand
Subject: Re: [Mingw-cross-env-list] Configure options for qt
Date: Sat, 16 Jan 2010 20:13:03 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-17.1 Thunderbird/3.0

Please remember to make sure that your messages are sent to the list.

>> Look for the "shared" version of qt.mk I posted earlier today if you
>> want to try that. Using plugins is simpler that way.
>>     
> I'm back on the subject. I took some time today and installed your
> shared version without any problem but I cannot succeed compiling my app
> (a single binary albeit with many sources files). If I try a standard
> build (I mean with sources and .pro files identical to the "static"
> version) the linker barks with :
>   

Your sources and pro file should *not* be identical to the static
version.  Remove the "plugin stuff" from you pro file and main.cpp (or
wherever it is.)  In other words, the stuff mentioned  here
http://qt.nokia.com/doc/4.6/plugins-howto.html#static-plugins is *only*
for static Qt.


> i686-pc-mingw32-g++ -enable-stdcall-fixup -Wl,-enable-auto-import
> -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-subsystem,windows -mthreads
> -Wl -Wl,--out-implib,release/libeditor.a -o release/editor.exe
> object_script.editor.Release
> -L"/home/pillot/mingw/mingw-cross-env-2.10-shared/usr/i686-pc-mingw32/lib"
> -lmingw32 -lqtmain
> -L/home/pillot/mingw/mingw-cross-env-2.10-shared/usr/i686-pc-mingw32/plugins/sqldrivers
> -lqsqlpsql -lpq -lsecur32 -lssl -lcrypto -lcrypt32 -lQtSql4 -lQtGui4
> -lQtCore4
>
>
> /home/pillot/mingw/mingw-cross-env-2.10-shared/usr/lib/gcc/i686-pc-mingw32/4.4.0/../../../../i686-pc-mingw32/bin/ld:
> cannot find -lqsqlpsql
>
> This may be not so surprising since the plugin directory contains this :
> address@hidden [357] mingw-cross-env-2.10-shared/usr/i686-pc-mingw32 ls
> plugins/sqldrivers/
> qsqlite4.dll  qsqlodbc4.dll  qsqlpsql4.dll  qsqltds4.dll
>   

These are the "shared" plugins. Good.

> I tried using qsqlpsql4 instead of qsqlpsql in the QTPLUGIN and
> QT_IMPORT_PLUGIN stanzas but strangely enough here is the linker output :
>   

Again, please do not use QTPLUGIN  and QT_IMPORT_PLUGIN when you have
shared plugins!

> i686-pc-mingw32-g++ -enable-stdcall-fixup -Wl,-enable-auto-import
> -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-subsystem,windows -mthreads
> -Wl -Wl,--out-implib,release/libeditor.a -o release/editor.exe
> object_script.editor.Release
> -L"/home/pillot/mingw/mingw-cross-env-2.10-shared/usr/i686-pc-mingw32/lib"
> -lmingw32 -lqtmain -lqsqlpsql4 -lpq -lsecur32 -lssl -lcrypto -lcrypt32
> -lQtSql4 -lQtGui4 -lQtCore4
> /home/pillot/mingw/mingw-cross-env-2.10-shared/usr/lib/gcc/i686-pc-mingw32/4.4.0/../../../../i686-pc-mingw32/bin/ld:
> cannot find -lqsqlpsql4
>
> The
> -L/home/pillot/mingw/mingw-cross-env-2.10-shared/usr/i686-pc-mingw32/plugins/sqldrivers
> has somehow disappeared !
>   

This is good. When you are working with shared plugins, there's nothing
to link to there.

> I must admit that I can't see any reason for this.
>
> Anyway I'm wondering if it would be possible for this approach to be
> successful since while Qt is build dynamically, libpq is still built
> statically ?
>   

It will work. First remove the "plugin stuff" as described above, run
qmake and make again, and then let us know what happens.


-Mark




reply via email to

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