Results 1 to 3 of 3

Thread: MySQL driver - Very strange problem. PLEASE HELP ME. Thanks.

  1. #1
    Join Date
    May 2009
    Posts
    28
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    MacOS X Unix/X11 Windows

    Default MySQL driver - Very strange problem. PLEASE HELP ME. Thanks.

    Hi all.
    I am trying to connect Mysql with QT on Window XP.
    I made steps:
    1. Installed QT SDK
    2. Installed MySQL
    3. I run Qt Command Prompt to Build the QMYSQL Plugin on Windows.
    cd %QTDIR%\src\plugins\sqldrivers\mysql
    qmake "INCLUDEPATH+=C:\Program Files\MySQL\MySQL Server 5.0\include" "LIBS+=C:\Program Files\MySQL\MySQL Server 5.0\lib\opt\libmysql.lib" mysql.pro
    make
    (follow QTdocuments)

    it appears me a very strange message :
    ...
    In file included from main.cpp:44:
    ../../../sql/drivers/mysql/qsql_mysql.h:52:19: mysql.h: No such file or directory
    In file included from main.cpp:44:
    ../../../sql/drivers/mysql/qsql_mysql.h:107: error: expected `)' before '*' token
    make[1]: *** [debug/main.o] Error 1
    make[1]: Leaving directory `C:/Qt/2009.02/qt/src/plugins/sqldrivers/mysql'
    make: *** [debug] Error 2
    What happends with me? Please help me.

    Thanks.
    Diego.
    Last edited by diego; 1st June 2009 at 08:53.

  2. #2
    Join Date
    May 2006
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: MySQL driver - Very strange problem. PLEASE HELP ME. Thanks.

    I ran in a similar problem just yesterday, trying to compile the PostgreSQL driver. It is likely the spaces in "Program Files" and "MySQL Server 5.0" are confusing qmake/make/Windows. Try to run "qmake" this way:

    qmake "INCLUDEPATH+=\"C:\Program Files\MySQL\MySQL Server 5.0\include\"" "LIBS+=\"C:\Program Files\MySQL\MySQL Server 5.0\lib\opt\libmysql.lib\"" mysql.pro

    (i.e. put \" around the paths). In my case this did the trick.
    Last edited by zio_tom78; 2nd June 2009 at 07:27. Reason: Spelling errors

  3. #3
    Join Date
    Jan 2009
    Posts
    45
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: MySQL driver - Very strange problem. PLEASE HELP ME. Thanks.

    Try this..

    cd %QTDIR%\src\plugins\sqldrivers\mysql
    qmake "INCLUDEPATH+='C:\Program Files\MySQL\MySQL Server 5.0\include'" "LIBS+='C:\Program Files\MySQL\MySQL Server 5.0\lib\opt\libmysql.lib'" mysql.pro
    make

Similar Threads

  1. Strange Qt 4.4.0 string problem
    By maverick_pol in forum Qt Programming
    Replies: 2
    Last Post: 15th May 2008, 06:46
  2. Very Strange problem
    By dreamer in forum Qt Programming
    Replies: 1
    Last Post: 30th April 2008, 09:20
  3. My Mysql 5 and Qt 4.2.2 Problem (Driver not loaded)
    By fengtian.we in forum Qt Programming
    Replies: 4
    Last Post: 9th February 2007, 08:11
  4. MySql plugin driver issues
    By stevey in forum Installation and Deployment
    Replies: 11
    Last Post: 20th September 2006, 13:45

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.