Results 1 to 2 of 2

Thread: Mysql plugin on Linux problem

  1. #1
    Join Date
    Jul 2010
    Posts
    30
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Mysql plugin on Linux problem

    Hello every one !
    When i try to create mysql plugin with my ubuntu i get this error

    Qt Code:
    1. /opt/qtsdk-2010.05/qt/src/plugins/sqldrivers/mysql$ sudo makeg++ -c -pipe -O2 -fvisibility=hidden -fvisibility-inlines-hidden -D_REENTRANT -Wall -W -fPIC -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtSql -I/usr/include/qt4 -I/usr/include/mysql -I. -o main.o main.cpp
    2. main.cpp:42: fatal error: qsqldriverplugin.h: No such file or directory
    3. compilation terminated.
    4. make: *** [main.o] Error 1
    To copy to clipboard, switch view to plain text mode 

    Help me please .
    thanks
    Impossible = I'mpossible

  2. #2
    Join Date
    Feb 2010
    Posts
    18
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Mysql plugin on Linux problem

    QT Docs say, that you need the sources for MySql
    How to Build the QMYSQL Plugin on Unix and Mac OS X

    You need the MySQL header files and as well as the shared library libmysqlclient.so. Depending on your Linux distribution you may need to install a package which is usually called "mysql-devel".

    Tell qmake where to find the MySQL header files and shared libraries (here it is assumed that MySQL is installed in /usr/local) and run make:

    cd $QTDIR/src/plugins/sqldrivers/mysql
    qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
    make

    After installing Qt, as described in the Installing Qt on X11 Platforms document, you also need to install the plugin in the standard location:

    cd $QTDIR/src/plugins/sqldrivers/mysql
    make install
    I don't understand, why you build your plugin yourself, on my Ubuntu installation, the mysql-plugin is installed. (You should find it, when you have libqt4-sql-mysql installed)

  3. The following user says thank you to majorwoody for this useful post:

    .:saeed:. (20th January 2011)

Similar Threads

  1. MySql Plugin again!
    By .:saeed:. in forum Newbie
    Replies: 4
    Last Post: 31st January 2011, 22:58
  2. MySql plugin on Mac OS X
    By tma in forum Installation and Deployment
    Replies: 1
    Last Post: 17th December 2010, 16:01
  3. MySql plugin
    By hubipet in forum Installation and Deployment
    Replies: 0
    Last Post: 7th August 2010, 12:23
  4. MySQL plugin
    By ksqt in forum Installation and Deployment
    Replies: 12
    Last Post: 24th September 2009, 14:26
  5. problem with plugin mysql
    By jose.va18 in forum Installation and Deployment
    Replies: 2
    Last Post: 19th September 2007, 13:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.