Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [SOLVED]undefined reference to QBasicAtomicInt
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]undefined reference to QBasicAtomicInt

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 4.6k 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.
  • Q Offline
    Q Offline
    Qt Nico
    wrote on last edited by
    #1

    I can compile my Qt project in Terminal bash but I'm having problems compiling with Qt Creator. here are some issue I've encounter:

    make: Entering directory /home/esn/SQSP/qespta' g++ -Wl,-rpath,/comp/qtb/lib -o qespta main.o MainWindow.o MessageWindow.o QespTest.o qextserialport.o qextserialenumerator.o qextserialport_unix.o qextserialenumerator_linux.o moc_MainWindow.o moc_MessageWindow.o moc_QespTest.o -L/comp/qtb/lib -lQtGui -L/comp/qtb/lib -L/usr/X11R6/lib -lQtCore -lpthread MainWindow.o: In function QString::~QString()':
    /comp/qtb/include/QtCore/qstring.h:880: undefined reference to QBasicAtomicInt::deref()' MessageWindow.o: In function QByteArray::~QByteArray()':
    /comp/qtb/include/QtCore/qbytearray.h:401: undefined reference to QBasicAtomicInt::deref()' MessageWindow.o: In function QString::QString(QString const&)':
    /comp/qtb/include/QtCore/qstring.h:726: undefined reference to QBasicAtomicInt::ref()' MessageWindow.o: In function QString::QString()':
    /comp/qtb/include/QtCore/qstring.h:879: undefined reference to QBasicAtomicInt::ref()' qextserialport.o: In function QByteArray::QByteArray()':
    /comp/qtb/include/QtCore/qbytearray.h:400: undefined reference to QBasicAtomicInt::ref()' qextserialenumerator_linux.o: In function QList<QString>::QList()':
    /comp/qtb/include/QtCore/qlist.h:121: undefined reference to QBasicAtomicInt::ref()' qextserialenumerator_linux.o: In function QList<QString>::~QList()':
    /comp/qtb/include/QtCore/qlist.h:731: undefined reference to QBasicAtomicInt::deref()' qextserialenumerator_linux.o: In function QList<QString>::QList(QList<QString> const&)':
    /comp/qtb/include/QtCore/qlist.h:122: undefined reference to QBasicAtomicInt::ref()' qextserialenumerator_linux.o: In function QList<QextPortInfo>::QList()':
    /comp/qtb/include/QtCore/qlist.h:121: undefined reference to QBasicAtomicInt::ref()' qextserialenumerator_linux.o: In function QList<QextPortInfo>::~QList()':
    /comp/qtb/include/QtCore/qlist.h:731: undefined reference to QBasicAtomicInt::deref()' qextserialenumerator_linux.o: In function QList<QString>::operator=(QList<QString> const&)':
    /comp/qtb/include/QtCore/qlist.h:441: undefined reference to QBasicAtomicInt::ref()' /comp/qtb/include/QtCore/qlist.h:442: undefined reference to QBasicAtomicInt::deref()'
    qextserialenumerator_linux.o: In function QList<QString>::detach_helper_grow(int, int)': /comp/qtb/include/QtCore/qlist.h:699: undefined reference to QBasicAtomicInt::deref()'
    qextserialenumerator_linux.o: In function QList<QextPortInfo>::detach_helper_grow(int, int)': /comp/qtb/include/QtCore/qlist.h:699: undefined reference to QBasicAtomicInt::deref()'
    qextserialenumerator_linux.o: In function QList<QString>::detach_helper(int)': /comp/qtb/include/QtCore/qlist.h:718: undefined reference to QBasicAtomicInt::deref()'
    collect2: error: ld returned 1 exit status
    make: Leaving directory `/home/esn/SQSP/qespta'
    make: *** [qespta] Error 1
    11:08:17: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project qespta (target: Qt 4.8.4 Comp(qts)2)
    When executing step 'Make'

    Please help me to solve this problem. thanks

    1 Reply Last reply
    0
    • D Offline
      D Offline
      daliusd
      wrote on last edited by
      #2

      If it compiles in terminal but not in QtCreator I would recommend comparing compile output from terminal and QtCreator (you have copy-paster latter here). Maybe you are using different Qt version in terminal and QtCreator. I believe QtCreator puts output to specific location (vs. compiling locally in terminal) - maybe cleaning up QtCreator output is all you need.

      QBasicAtomicInt::deref() is part of QtCore and I see it included in linked library list (-lQtCore). As well I don't see compilation stage in your copy-paste only linking. Therefore I tend to believe that compilation stage was done with different Qt version.

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        Qt Nico
        wrote on last edited by
        #3

        Ahhh... Actually, my operating system crashes last time. and I've just restored my operating system to it's previous working state and it actually solved my problem. thanks again daliusd. :)

        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