Results 1 to 2 of 2

Thread: Create MYSQL files on Mac OS X Lion for QtSDK

  1. #1

    Default Create MYSQL files on Mac OS X Lion for QtSDK

    Dear reader,

    When I try to make my MYSQL files I am getting the following error:

    imac-van-angelo:mysql Devbizz$ make
    make -f Makefile.Debug
    rm -f libqsqlmysql_debug.dylib
    g++ -headerpad_max_install_names -arch x86_64 -single_module -dynamiclib -Xarch_x86_64 -mmacosx-version-min=10.5 -o libqsqlmysql_debug.dylib debug/main.o debug/qsql_mysql.o debug/moc_qsql_mysql.o -F/Users/Devbizz/QtSDK/Desktop/Qt/473/gcc/lib -L/Users/Devbizz/QtSDK/Desktop/Qt/473/gcc/lib -L/usr/local/mysql/lib -lmysqlclient -framework QtSql -framework QtCore
    ld: warning: ignoring file /usr/local/mysql/lib/libmysqlclient.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64)
    Undefined symbols for architecture x86_64:
    "_mysql_real_escape_string", referenced from:
    QMYSQLDriver::formatValue(QSqlField const&, bool) constin qsql_mysql.o
    "_mysql_error", referenced from:
    qMakeError(QString const&, QSqlError::ErrorType, QMYSQLDriverPrivate const*)in qsql_mysql.o
    "_mysql_num_fields", referenced from:
    QMYSQLResultPrivate::bindInValues() in qsql_mysql.o
    ld: symbol(s) not found for architecture x86_64
    collect2: ld returned 1 exit status
    make[1]: *** [libqsqlmysql_debug.dylib] Error 1
    make: *** [debug] Error 2
    imac-van-angelo:mysql Devbizz$
    What I did was:
    Qt Code:
    1. qmake -o Makefile "INCLUDEPATH+=/usr/local/mysql/include" "LIBS+=-L/usr/local/mysql/lib -lmysqlclient" mysql.pro
    To copy to clipboard, switch view to plain text mode 

    No errors there, so I think everything is alright.

    After that I give the command:

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

    which results in the error above.

    Can someone tell me what I did wrong?

  2. #2
    Join Date
    Jan 2012
    Posts
    46
    Thanks
    11
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Create MYSQL files on Mac OS X Lion for QtSDK

    Bumping this up -- a few months I built the drivers w/absolutely no problems, had my project recognize the drivers, but when I tried to actually access a database I got some errors, so I decided to rebuild from scratch, including downloading the latest MySQL software. Now I'm getting the same error; it's possible I had the error and got around it quickly but I don't remember how, if so, so I thought I'd see if anyone else has solved the problem

    thanks!


    Kodi


    Added after 8 minutes:


    So after hours of work and minutes after bumping this up I solved the issue -- instead of using "qmake", I used "/Users/xxxx/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake" and the libraries got created.

    Kodi
    Last edited by mtnbiker66; 26th December 2012 at 19:48.

Similar Threads

  1. Replies: 1
    Last Post: 7th April 2012, 06:05
  2. Replies: 0
    Last Post: 14th September 2011, 02:59
  3. Using QtSDk with Mysql 64bit
    By cia.michele in forum Installation and Deployment
    Replies: 0
    Last Post: 29th August 2011, 13:59
  4. Cannot create MySQL stored procedure / views from Qt
    By pshah.mumbai in forum Qt Programming
    Replies: 8
    Last Post: 8th October 2008, 16:22
  5. using Mysql: Ca't create TCP/IP socket
    By blackliteon in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2006, 18:25

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.