[Qt-interest] static Qt with MySQL Problem
Nikos Chantziaras
realnc at arcor.de
Sun Jul 10 21:40:34 CEST 2011
Are you on Windows with a MS compiler? Maybe this helps:
http://windowsmobiledn.com/forum/viewtopic.php?p=29609
On 07/10/2011 11:00 AM, Sujan Dasmahapatra wrote:
> Hi Nikos its not working still. I did that but its not resolved I can
> see some more errors are coming in. like
> qsql_mysql.cpp:-1: error: undefined reference to `mysql_thread_end at 0'
> <mailto:`mysql_thread_end at 0'>
>
> On Sat, Jul 9, 2011 at 2:00 PM, Nikos Chantziaras <realnc at arcor.de
> <mailto:realnc at arcor.de>> wrote:
>
> On 07/09/2011 11:19 PM, Sujan Dasmahapatra wrote:
> > Dear Friends
> > I have just configured Qt 4.7.3 statically. It was fine. Now I am
> > trying to build my mysql application with the static Qt. it gives the
> > following errors.
> > (.text[_gen_codes]+0x4):-1: error: undefined reference to
> > `__security_cookie'
> > (.text[_gen_codes]+0x6f):-1: error: undefined reference to
> > `@__security_check_cookie at 4' <mailto:`@__security_check_cookie at 4'>
> > (.text[_inflate_table]+0x7):-1: error: undefined reference to
> > `__security_cookie'
> > (.text[_inflate_table]+0xf8):-1: error: undefined reference to
> > `@__security_check_cookie at 4' <mailto:`@__security_check_cookie at 4'>
> > (.text[_inflate_table]+0x4e3):-1: error: undefined reference to
> > `@__security_check_cookie at 4' <mailto:`@__security_check_cookie at 4'>
> > :-1: error: collect2: ld returned 1 exit status
> > With the normal version of Qt its compiling perfectly. But with the
> > static version this throws these errors. Any help would be
> appreciated.
> > Thanks sujan
>
> In static builds, you need to include the plugins manually. In your
> .pro file:
>
> QTPLUGIN += qsqlmysql
>
> Then, in a .cpp source file that you link in your project (I do it in my
> main.cpp):
>
> #include <QtPlugin>
> Q_IMPORT_PLUGIN(qsqlmysql)
More information about the Qt-interest-old
mailing list