[Qt-interest] loading sql plug in

Yuvaraj R yuvaraj at ongobiz.com
Tue Sep 29 09:52:03 CEST 2009


Hi All place the Sql folder outside of project..It contains following files

1) qsqlmysql

2)libqsqlmysql4.a

My  .pro file is

TARGET = MaxxTel

TEMPLATE = app

QT += core \

gui \

xml \

network

QT += sql

QTPLUGIN += qsqlmysql

SOURCES += main.cpp \

mainwindow.cpp \

widget1.cpp \

pjcallback.cpp \

buddy.cpp \

form.cpp \

setting_form.cpp \

treewidget_override.cpp \

registration_form.cpp \

conference.cpp \

tab_widget.cpp \

window_alert.cpp \

text_edit1.cpp \

style_sheet.cpp \

line_edit.cpp \

string_new.cpp \

login.cpp \

create_database.cpp \

history_call.cpp

HEADERS += mainwindow.h \

widget1.h \

pjcallback.h \

buddy.h \

form.h \

setting_form.h \

treewidget_override.h \

registration_form.h \

conference.h \

tab_widget.h \

window_alert.h \

text_edit1.h \

style_sheet.h \

line_edit.h \

string_new.h \

login.h \

create_database.h \

../connection.h \

history_call.h

FORMS += mainwindow.ui \

widget1.ui \

form.ui \

setting_form.ui \

registration_form.ui \

window_alert.ui \

login.ui \

conference.ui

INCLUDEPATH += ../pjproject-1.0.2/pjlib/include \

../pjproject-1.0.2/pjlib-util/include \

../pjproject-1.0.2/pjnath/include \

../pjproject-1.0.2/pjmedia/include \

../pjproject-1.0.2/pjsip/include

LIBS += -L../pjproject-1.0.2/pjlib/lib \

-L../pjproject-1.0.2/pjlib-util/lib \

-L../pjproject-1.0.2/pjnath/lib \

-L../pjproject-1.0.2/pjmedia/lib \

-L../pjproject-1.0.2/pjsip/lib \

-L../pjproject-1.0.2/third_party/lib \

-L../Sql

RESOURCES += image.qrc

win32-g++:LIBS += -L../openssl-0.9.8g

win32-g++:LIBS += -lpjsua-i686-pc-mingw32 \

-lpjsip-ua-i686-pc-mingw32 \

-lpjsip-simple-i686-pc-mingw32 \

-lpjsip-i686-pc-mingw32 \

-lpjmedia-codec-i686-pc-mingw32 \

-lpjmedia-i686-pc-mingw32 \

-lpjnath-i686-pc-mingw32 \

-lpjlib-util-i686-pc-mingw32 \

-lpj-i686-pc-mingw32 \

-lportaudio-i686-pc-mingw32 \

-lgsmcodec-i686-pc-mingw32 \

-lilbccodec-i686-pc-mingw32 \

-lspeex-i686-pc-mingw32 \

-lresample-i686-pc-mingw32 \

-lmilenage-i686-pc-mingw32 \

-lsrtp-i686-pc-mingw32 \

-lm \

-lwinmm \

-lole32 \

-lws2_32 \

-lwsock32 \

-lqsqlmysql


when i am trying to build ,i am getting following error


cannot find -lqsqlmysql



Please help me to load the mysql plug in to my project



Thanks


Yuvaraj R





On Tue, Sep 29, 2009 at 11:17 AM, Yuvaraj R <yuvaraj at ongobiz.com> wrote:

> Thanks for your reply
>
> I realized my mistake..
>
> still i didn't load the plug in
>
> i place sql folder in my project and inserted the created qsqlmysql.dll in
> folder..
>
> in pro file
>
> LIBS += -L../sql
>
> In my main function i used following macro
>
> Q_IMPORT_PLUGIN(qsqlmysql)
>
> but i am getting following error.
>  error: undefined reference to `qt_plugin_instance_qsqlmysql()'
>
>
> Thanks
>
> Yuvaraj R
>
>
> Then i added in my pro file ..
>
> On Tue, Sep 29, 2009 at 11:07 AM, Christopher Rasch-Olsen Raa <
> christopher at technophile.info> wrote:
>
>> Hi,
>>
>> What does the plugin-system say? Does your plugin get loaded? If so, what
>> does
>> the errors you get when loading a database say? Without this information
>> is
>> _really_ hard for us to help.
>>
>> --
>> Christopher
>>
>> On Tuesday 29 September 2009 07:31:14 Yuvaraj R wrote:
>> > Hi All
>> >
>> >  I created the sql plug in .
>> >
>> > I tried with
>> >
>> >
>> > QSqlDatabase db = QSqlDatabase::addDatabase("Mysql");
>> >
>> > db.setDatabaseName("Addu");
>> >
>> > but i am getting error..
>> >
>> > how do i use the plugin in my project and upload to project.
>> >
>> > please help me
>> >
>> > can anybody provide me a useful links
>> >
>> > Thanks
>> >
>> > Yuvaraj R
>> >
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090929/e39aba3f/attachment.html 


More information about the Qt-interest-old mailing list