gpt4 book ai didi

c++ - "undefined reference to ' QScriptEngine::QScriptEngine()"

转载 作者:太空狗 更新时间:2023-10-29 23:45:32 31 4
gpt4 key购买 nike

给出这段代码,我得到:“对'QScriptEngine::QScriptEngine() 的 undefined reference ”

#include <QtScript/QScriptEngine>

...

QScriptEngine e;

/* Commented out to understand the instantiation error first
e.globalObject().setProperty("t", 123);

bool result = e.evaluate("(t>=2 && t<5) || (t<1)").toBool();
*/

最佳答案

您是否在您的 pro 中声明了脚本?

 QT += script

关于c++ - "undefined reference to ' QScriptEngine::QScriptEngine()",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18128157/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com