Results 1 to 7 of 7

Thread: issues compiling Qt4.1 with mysql

  1. #1
    Join Date
    Jan 2006
    Posts
    46
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default issues compiling Qt4.1 with mysql

    This is the output I get from configure though I do have all my libmysqlclient-dev install, I use kubuntu, anyone?
    Qt Code:
    1. g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/linux-g++ -I. -I. -o mysql.o mysql.cpp
    2. mysql.cpp:1:19: error: mysql.h: No such file or directory
    3. make: *** [mysql.o] Error 1
    4. MySQL (thread-unsafe) disabled.
    5. MySQL support cannot be enabled due to functionality tests!
    To copy to clipboard, switch view to plain text mode 

    and "locate mysql.h" does return "/usr/include/mysql/mysql.h".

    Thanx in advance

    Patcito

  2. #2
    Join Date
    Jan 2006
    Posts
    46
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: issues compiling Qt4.1 with mysql

    How did you configure it?
    Can you show us your ./configure options?
    Kandalf
    There's no place like ~

  3. #3
    Join Date
    Jan 2006
    Posts
    46
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: issues compiling Qt4.1 with mysql

    ./configure -v -qt-sql-mysql -qt-sql-sqlite

  4. #4
    Join Date
    Jan 2006
    Location
    Russia, Moscow Region
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: issues compiling Qt4.1 with mysql

    Quote Originally Posted by patcito
    ./configure -v -qt-sql-mysql -qt-sql-sqlite
    Try this:
    Qt Code:
    1. ./configure -v -qt-sql-mysql -I/usr/include/mysql -qt-sql-sqlite
    To copy to clipboard, switch view to plain text mode 

  5. #5
    Join Date
    Jan 2006
    Posts
    46
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: issues compiling Qt4.1 with mysql

    Maybe you can modify your CFLAGS env var to include /usr/include/mysql too.
    Kandalf
    There's no place like ~

  6. #6
    Join Date
    Mar 2006
    Posts
    1
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: issues compiling Qt4.1 with mysql

    I've got the same problem with 4.1.1 - did anyone else get around this?

    When I add -I/usr/include/mysql, I get the following output:

    MySQL (thread-safe) auto-detection... (-I/usr/include/mysql)
    g++ -o mysql_r mysql.o -lmysqlclient_r
    /usr/bin/ld: cannot find -lmysqlclient_r
    collect2: ld returned 1 exit status
    make: *** [mysql_r] Error 1
    MySQL (thread-safe) disabled.
    MySQL (thread-unsafe) auto-detection... (-I/usr/include/mysql)
    g++ -o mysql mysql.o -lmysqlclient
    /usr/bin/ld: cannot find -lmysqlclient
    collect2: ld returned 1 exit status
    make: *** [mysql] Error 1
    MySQL (thread-unsafe) disabled.
    MySQL support cannot be enabled due to functionality tests!
    Turn on verbose messaging (-v) to ./configure to see the final report.
    If you believe this message is in error you may use the continue
    switch (-continue) to ./configure to continue.

    (oops - the FAQ mentions to use the -L option - thanks for pointing it out below).
    Last edited by mgleahy; 6th March 2006 at 22:51.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: issues compiling Qt4.1 with mysql


  8. The following user says thank you to wysota for this useful post:

    mgleahy (6th March 2006)

Similar Threads

  1. Replies: 1
    Last Post: 13th February 2009, 00:17
  2. Embedded Mysql Windows Qt4.1
    By benguela in forum Qt Programming
    Replies: 7
    Last Post: 17th January 2007, 00:13
  3. MySql plugin driver issues
    By stevey in forum Installation and Deployment
    Replies: 11
    Last Post: 20th September 2006, 13:45
  4. Issues regarding QMySql drivers and mysql database
    By bera82 in forum Qt Programming
    Replies: 2
    Last Post: 10th August 2006, 17:50
  5. mySql Result Datatype issues!!!
    By bera82 in forum Qt Programming
    Replies: 2
    Last Post: 21st March 2006, 10:26

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.