Results 1 to 2 of 2

Thread: (Another) Can't build MySql driver on Mac OSX

  1. #1
    Join Date
    Jun 2013
    Location
    Northern Rivers, NSW Australia
    Posts
    13
    Thanks
    5
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default (Another) Can't build MySql driver on Mac OSX

    Seems to be a popular question but I can't find a suitable answer from those past questions....
    Am following instructions at http://doc-snapshot.qt-project.org/q...ql-driver.html

    I run qmake like so:

    Qt Code:
    1. ~/Qt/5.4/clang_64/bin/qmake "INCLUDEPATH+=/usr/local/mysql-5.6.22-osx10.8-x86_64/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
    To copy to clipboard, switch view to plain text mode 

    So far, so good.

    Qt Code:
    1. make
    To copy to clipboard, switch view to plain text mode 

    Chugs along, and then:

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -stdlib=libc++ -mmacosx-version-min=10.7 -single_module -dynamiclib -o libqsqlmysql.dylib .obj/release/main.o .obj/release/qsql_mysql.o .obj/release/moc_qsql_mysql_p.o -F/Users/vi/Qt/5.4/clang_64/lib -L/usr/local/lib -L/opt/local/lib/mysql55/mysql -lmysqlclient_r -lz -framework QtSql -framework QtCore -framework DiskArbitration -framework IOKit
    ld: warning: directory not found for option '-L/opt/local/lib/mysql55/mysql'
    ld: library not found for -lmysqlclient_r
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[1]: *** [../../../../plugins/sqldrivers/libqsqlmysql.dylib] Error 1
    make: *** [release-all] Error 2
    I don't seem to have the file mysqlclient_r OR mysql55 folder on my system... Is Xcode looking for them ?
    Last edited by Gretsch; 29th January 2015 at 11:27. Reason: updated contents

  2. #2
    Join Date
    Jun 2013
    Location
    Northern Rivers, NSW Australia
    Posts
    13
    Thanks
    5
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: (Another) Can't build MySql driver on Mac OSX

    OK, I'm now following the docs that came with Qt Creator (Building the Drivers Using Configure)
    I run configure -help and it appears the client libraries are detected.
    I run configure -plugin-sql-mysql
    I run make.

    /Users/vi/Qt/5.4/Src/qtbase/src/plugins/sqldrivers/mysql/main.cpp:67:10: fatal error: 'main.moc' file not found
    #include "main.moc"
    ^
    1 error generated.
    make[6]: *** [.obj/release/main.o] Error 1
    make[5]: *** [release-all] Error 2
    make[4]: *** [sub-mysql-make_first] Error 2
    make[3]: *** [sub-sqldrivers-make_first] Error 2
    make[2]: *** [sub-plugins-make_first] Error 2
    make[1]: *** [sub-src-make_first] Error 2
    make: *** [module-qtbase-make_first] Error 2
    Dunno what to make (excuse the pun) of this, why isn't main.mc generated ?

Similar Threads

  1. Build mysql driver for Andorid arm V5
    By Abel in forum Installation and Deployment
    Replies: 0
    Last Post: 29th May 2014, 07:41
  2. Mysql Driver build Issue
    By davethomaspilot in forum Installation and Deployment
    Replies: 1
    Last Post: 4th January 2014, 18:02
  3. source code for odbc driver or MySql driver in arm-embedded-linux
    By sattu in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 24th January 2011, 10:11
  4. [QT 4.6] Error build driver mysql
    By vinny gracindo in forum Installation and Deployment
    Replies: 1
    Last Post: 26th February 2010, 01:02
  5. Build MySql driver in Windows Vista
    By Raccoon29 in forum Qt Programming
    Replies: 6
    Last Post: 11th January 2010, 13:01

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.