[Qt-interest] static Qt with MySQL Problem

Sujan Dasmahapatra sujan.dasmahapatra at gmail.com
Sun Jul 10 11:13:01 CEST 2011


My .pro file  is looking like this

/////////////////////////////////////////////////////////////////////////////////////////
TEMPLATE = app

TARGET = STUREC

DEPENDPATH +=  src lib C:\MySQL\MySQLServer5.5\lib
C:\Qt\4.7.3-static\plugins\sqldrivers

INCLUDEPATH += include C:\MySQL\MySQLServer5.5\include

# Input

 QT	+=  sql

 QTPLUGIN += qsqlmysql

 CONFIG += static

 MOC_DIR      = moc

 OBJECTS_DIR  = obj

 HEADERS += include/consoleview.h include/graphicsview.h
include/mainwindow.h include/treewidget.h \

    include/ui_newentry.h \

    include/newentry.h \

    include/ui_displayentry.h \

    include/displayentry.h \

    include/ui_search.h \

    include/search.h \

    include/ui_searchentry.h

SOURCES += src/consoleview.cpp src/graphicsview.cpp src/main.cpp
src/mainwindow.cpp src/treewidget.cpp \

    src/newentry.cpp \

    src/displayentry.cpp \

    src/search.cpp

 RESOURCES += rc/sturec.qrc

 LIBS	    +=  -Llib -lQtCore  -lQtGui \

                -LC:\MySQL\MySQLServer5.5\lib -lmysqlclient  -llibmysql -lmysql

 FORMS += \

    rc/newentry.ui \

    rc/displayentry.ui \

    rc/search.ui \

    rc/searchentry.ui

//////////////////////////////////////////////////////////////////////////////////////////
And  in the main.cpp I have
  #include <QtPlugin>
Q_IMPORT_PLUGIN(qsqlmysql)

/////////////////////////////////////////////////////////////////////////////////////////////
Still gives the same errors with many more. Any help would be appreciated.
Thanks sujan


On Sun, Jul 10, 2011 at 1:00 AM, Sujan Dasmahapatra <
sujan.dasmahapatra at gmail.com> 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'<mysql_thread_end at 0'>
>
> On Sat, Jul 9, 2011 at 2:00 PM, Nikos Chantziaras <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)
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at qt.nokia.com
>> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>>
>
>
>
> --
> Thanks & Regards
> Sujan Dasmahapatra
> B.E. (Aeronautics)
> Bangalore, India
> Ph:91-9900839788
> mail id : sujan.dasmahapatra at gmail.com
> yahoo msn : dasmahapatra.aerodynamics at yahoo.co.in
> icq # 556023244
> skype:sujan.dasmahapatra at skyepe.com
> msn: sujan.dasmahapatra at hotmail.com
>



-- 
Thanks & Regards
Sujan Dasmahapatra
B.E. (Aeronautics)
Bangalore, India
Ph:91-9900839788
mail id : sujan.dasmahapatra at gmail.com
yahoo msn : dasmahapatra.aerodynamics at yahoo.co.in
icq # 556023244
skype:sujan.dasmahapatra at skyepe.com
msn: sujan.dasmahapatra at hotmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110710/9286c0cd/attachment.html 


More information about the Qt-interest-old mailing list