Results 1 to 6 of 6

Thread: qDebug / qStringList - Problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2011
    Posts
    11
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default qDebug / qStringList - Problem

    Hi there,

    i tried to built a very simple application, just to test what SQL database plugins are installed:

    Qt Code:
    1. #include <QtCore/QCoreApplication>
    2. #include <QDebug>
    3. #include <QtSql/QSqlDatabase>
    4. #include <QStringList>
    5.  
    6. int main(int argc, char *argv[])
    7. {
    8. QCoreApplication a(argc, argv);
    9.  
    10. qDebug() << QSqlDatabase::drivers();
    11.  
    12.  
    13. return a.exec();
    14. }
    To copy to clipboard, switch view to plain text mode 

    This is all the code i've written. I know that this code worked in former versions of Qt, but now, it doesn't anymore. When I try to compile, i get this "symbol(s) not found for architecture x86_64" error.

    Here's the complete output:

    Qt Code:
    1. make: Entering directory `/.../MyProject-build-Desktop-Debug'
    2. cd subProject/ && /usr/bin/make -f Makefile
    3. make[1]: Entering directory `/.../My-build-Desktop-Debug/subProject'
    4. g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o dsp_Server main.o -F/Library/Frameworks -L/Library/Frameworks -framework QtCore
    5. Undefined symbols for architecture x86_64:
    6. "QSqlDatabase::drivers()", referenced from:
    7. _main in main.o
    8. ld: symbol(s) not found for architecture x86_64
    9. collect2: ld returned 1 exit status
    10. make[1]: *** [dsp_Server] Error 1
    11. make[1]: Leaving directory `/.../MyProject-build-Desktop-Debug/subProject'
    12. make: Leaving directory `/.../MyProject-build-Desktop-Debug'
    13. make: *** [subProject-make_default] Error 2
    14. 17:38:12: The process "/usr/bin/make" exited with code 2.
    15. Error while building/deploying project MyProject (target: Desktop)
    16. When executing step 'Make'
    To copy to clipboard, switch view to plain text mode 

    I'm using Qt 4.8.2 under OS X 10.8.2. Can anybody help?

    Thanks,
    Markus

    EDIT: Sorry for misfitting title... Before this problem occured, i had problems because i forgot to add the #include <QStringList> line (which also wasn't necessary the last time i used Qt)...
    Last edited by EMKAH; 18th November 2012 at 17:02. Reason: updated contents

Similar Threads

  1. Problem with QT 4.6 qDebug and QString.
    By weaver4 in forum Newbie
    Replies: 7
    Last Post: 18th March 2013, 12:15
  2. QStringList problem :/
    By hakermania in forum Qt Programming
    Replies: 9
    Last Post: 17th August 2010, 13:55
  3. qstringlist problem
    By stella1016 in forum Qt Programming
    Replies: 4
    Last Post: 17th December 2009, 09:16
  4. QStringList scope problem
    By ht1 in forum Qt Programming
    Replies: 5
    Last Post: 30th November 2007, 19:44
  5. Replies: 7
    Last Post: 2nd June 2006, 12:48

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.