Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Undefined reference wheh using QScriptEngine and QScriptValues.



  • Hello, I need to parse jsons array that I receive through a Network request.

    I saw this website: http://qtwiki.org/Parsing_JSON_with_QT_using_standard_QT_library
    and tried simulate that technique. The problem is that, when I instantiate QScriptEngine and QScriptValue
    type objects, I get the following build errors:

    undefined reference to _imp__ZN12QScriptValueC1Ev' undefined reference to_imp___ZN13QScriptEngineC1Ev'
    undefined reference to _imp___ZN13QScriptEngine8evaluateERK7QStringS2_i' undefined reference to_imp___ZN12QScriptValueD1Ev'
    undefined reference to _imp___ZN13QScriptEngineD1Ev' undefined reference to_imp___ZN13QScriptEngineD1Ev'
    undefined reference to _imp___ZN12QScriptValueD1Ev' undefined reference to_imp___ZN12QScriptValueD1Ev'

    Maybe there's something missing from my Qt installation?
    Any help would be very appreciated.

    Thanks,

    Sergio



  • You need the Qt Script module. Add to your .pro file:

    @
    QT += script
    @



  • Thanks. You save my day.


Log in to reply