Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. MYSQL Installation on Mac OS X
Forum Updated to NodeBB v4.3 + New Features

MYSQL Installation on Mac OS X

Scheduled Pinned Locked Moved 3rd Party Software
2 Posts 2 Posters 3.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Devbizz
    wrote on last edited by
    #1

    Dear reader,

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

    [QUOTE]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_errno", referenced from:
    qMakeError(QString const&, QSqlError::ErrorType, QMYSQLDriverPrivate const*)in qsql_mysql.o
    QMYSQLResult::record() const in qsql_mysql.o
    "_mysql_stmt_close", referenced from:
    QMYSQLResult::cleanup() in qsql_mysql.o
    "_mysql_real_query", referenced from:
    QMYSQLResult::reset(QString const&) in qsql_mysql.o
    "_mysql_stmt_init", referenced from:
    QMYSQLResult::prepare(QString const&) in qsql_mysql.o
    "_mysql_stmt_prepare", referenced from:
    QMYSQLResult::prepare(QString const&) in qsql_mysql.o
    "_mysql_stmt_result_metadata", referenced from:
    QMYSQLResultPrivate::bindInValues() 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$ [/QUOTE]

    What I did was:
    [CODE]qmake -o Makefile "INCLUDEPATH+=/usr/local/mysql/include" "LIBS+=-L/usr/local/mysql/lib -lmysqlclient" mysql.pro[/CODE]

    No errors there, so I think everything is alright.

    After that I give the command:

    [CODE]make[/code]

    which results in the error above.

    Can someone tell me what I did wrong?

    P.S. its not the full error code, cause it would overwrite the maximum number of allowed characters in this post :)

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      Your Qt version is built as 64 bit version (x86_64), but the mysql libs you have installed are not, most probably, they're 32bit Intel binaries (i386). You can check on the command line using this:

      @
      lipo -info /usr/local/mysql/lib/libmysqlclient.dylib
      @

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved