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 10:23:22 +0100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706)

Mark Brand a écrit :
>> A remaining issue arises when your static Qt plugin depends on a static
>> library outside Qt. This obviously comes up in mingw-cross-env. For
>> example, qsqlpsql might depend on pq. In such cases "QTPLUGIN +=
>> qsqlpsql" is not enough to get qmake to create a Makefile that links to
>> pq.  What seems to work is "QTPLUGIN += qsqlpsql pq", but I don't know
>> if this is the best way to solve the problem.

OK, I got it. Part (probably all) of my problems comes from the fact
that there was no Q_IMPORT_PLUGIN and QTPLUGIN stuff in my sources. This
was not needed on my debian box (which is quite a mystery when I think
about it since the libqt4-sql-psql package only installs the file
/usr/lib/qt4/plugins/sqldrivers/libqsqlpsql.so) and on the Windows box
my old Qt 4.4.3 had been recompiled with the -qt-sql-psql flag.

Yet, after I corrected this I stumble on errors with the linker :

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/editor.exe object_script.editor.Release
-L"/home/pillot/mingw/mingw-cross-env-2.10/usr/i686-pc-mingw32/lib"
-lmingw32 -lqtmain
-L/home/pillot/mingw/mingw-cross-env-2.10/usr/i686-pc-mingw32/plugins/sqldrivers
-lqsqlpsql -lpq -lQtSql -lQtGui -lgdi32 -lcomdlg32 -loleaut32 -limm32
-lwinmm -lwinspool -lmsimg32 -lQtCore -lpng -lkernel32 -luser32
-lshell32 -luuid -lole32 -ladvapi32 -lws2_32 -lz

./release/editor.o:editor.cpp:(.text+0x15): undefined reference to
`qt_plugin_instance_pq()'

/home/pillot/mingw/mingw-cross-env-2.10/usr/i686-pc-mingw32/lib/libpq.a(fe-connect.o):fe-connect.c:(.text+0x18da):
undefined reference to address@hidden'


/home/pillot/mingw/mingw-cross-env-2.10/usr/i686-pc-mingw32/lib/libpq.a(fe-connect.o):fe-connect.c:(.text+0x1907):
undefined reference to address@hidden'


/home/pillot/mingw/mingw-cross-env-2.10/usr/i686-pc-mingw32/lib/libpq.a(fe-misc.o):fe-misc.c:(.text+0xce):
undefined reference to `_SSL_pending'
[ ... ]

Which is the consequence of the -lsecur32, -lssl, -lcrypto and -lcrypt32
flags being absent. So, I modified my src.pro to have
QTPLUGIN += qsqlpsql pq secur32 ssl crypto crypt32

and that made the trick !

I now have to investigate why I do not need the plugin stuff on debian
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).

Big up Mark !

> 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 will look at it, yes.

phep




reply via email to

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