Results 1 to 2 of 2

Thread: Qt - undefined reference to QJsonValue::toString

  1. #1
    Join Date
    Apr 2016
    Posts
    3
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Qt - undefined reference to QJsonValue::toString

    I'm trying to build a sample project using Qt 5.7 over Linux. Previously, the same project have been built with Qt 5.4.2 without issues. When I try with Qt 5.7, I get the followings errors:

    Qt Code:
    1. undefined reference to `QJsonValue::toString() const'
    To copy to clipboard, switch view to plain text mode 

    I have tried installing Qt5.7 with Qt Maintenance Tool and also download from Qt official site and install it using .run file. When I run a locate to qjsonvalue I get the followings results:

    Qt Code:
    1. $ locate qjsonvalue
    2. /opt/Qt/5.4/Src/qtbase/include/QtCore/qjsonvalue.h
    3. /opt/Qt/5.4/Src/qtbase/src/corelib/json/qjsonvalue.cpp
    4. /opt/Qt/5.4/Src/qtbase/src/corelib/json/qjsonvalue.h
    5. /opt/Qt/5.4/android_armv7/include/QtCore/qjsonvalue.h
    6. /opt/Qt/5.4/android_x86/include/QtCore/qjsonvalue.h
    7. /opt/Qt/5.4/gcc_64/include/QtCore/qjsonvalue.h
    8. /usr/include/qt5/QtCore/qjsonvalue.h
    9. /usr/share/doc/qt5/qtcore/qjsonvalue-members.html
    10. /usr/share/doc/qt5/qtcore/qjsonvalue.html
    To copy to clipboard, switch view to plain text mode 

    According with the previous results, seems that I need to install something becuase qjsonvalue.h/cpp is not in my Qt5.7 core. Any ideas about how to solve it? Need to install anything else? As note, when I start Qt Maintenance Tool I get an alert message that says the following:

    Qt Code:
    1. Your installation seems to be corrupted. Please consider re-installing from scratch.
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt - undefined reference to QJsonValue::toString

    Quote Originally Posted by jngd View Post
    According with the previous results, seems that I need to install something becuase qjsonvalue.h/cpp is not in my Qt5.7 core. Any ideas about how to solve it? Need to install anything else? As note, when I start Qt Maintenance Tool I get an alert message that says the following:

    Qt Code:
    1. Your installation seems to be corrupted. Please consider re-installing from scratch.
    To copy to clipboard, switch view to plain text mode 
    You should probably fix this first, because QJsonValue is in QtCore in Qt5
    http://doc.qt.io/qt-5/qjsonvalue.html

    Cheers,
    _

Similar Threads

  1. Undefined reference
    By eekhoorn12 in forum Qt Programming
    Replies: 2
    Last Post: 6th January 2011, 16:45
  2. undefined reference
    By digidas in forum Newbie
    Replies: 9
    Last Post: 19th May 2010, 14:04
  3. undefined reference
    By jayreddy in forum Qt Programming
    Replies: 1
    Last Post: 20th November 2009, 14:45
  4. Undefined Reference To...
    By ManuMies in forum Qt Programming
    Replies: 6
    Last Post: 10th February 2009, 13:14
  5. Undefined reference
    By Salazaar in forum Newbie
    Replies: 12
    Last Post: 23rd May 2007, 11:21

Tags for this Thread

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.