编译Qt应用程序时找不到libQtScript.so.4

时间:2011-05-16 18:33:19

标签: qt4 compiler-errors solaris

我在Solaris 10(ugh)上编译Qt应用程序时遇到了麻烦。该应用程序依赖于libQtDesigner。它在我尝试的其他所有内容(Win 7,Mac,Ubuntu,RedHat)上编译得很好。但是,在Solaris 10上,我收到以下错误:

ld: warning: file libQtScript.so.4: required by /tools/Qt-4.6.1_32/lib/libQtDesigner.so, not found
Undefined                       first referenced
 symbol                             in file
QScriptValue QScriptEngine::newQObject(QObject*,QScriptEngine::ValueOwnership,const QFlags<QScriptEngine::QObjectWrapOption>&) /tools/Qt-4.6.1_32/lib/libQtDesigner.so
QScriptEngine::~QScriptEngine()         /tools/Qt-4.6.1_32/lib/libQtDesigner.so
QString QScriptValue::toString()const /tools/Qt-4.6.1_32/lib/libQtDesigner.so
void QScriptEngine::popContext() /tools/Qt-4.6.1_32/lib/libQtDesigner.so
bool QScriptValue::isValid()const   /tools/Qt-4.6.1_32/lib/libQtDesigner.so
QScriptValue::~QScriptValue()          /tools/Qt-4.6.1_32/lib/libQtDesigner.so
void QScriptValue::setProperty(const QString&,const QScriptValue&,const QFlags<QScriptValue::PropertyFlag>&) /tools/Qt-4.6.1_32/lib/libQtDesigner.so
void QScriptValue::setProperty(unsigned,const QScriptValue&,const QFlags<QScriptValue::PropertyFlag>&) /tools/Qt-4.6.1_32/lib/libQtDesigner.so
QScriptValue QScriptContext::activationObject()const /tools/Qt-4.6.1_32/lib/libQtDesigner.so
int QScriptEngine::uncaughtExceptionLineNumber()const /tools/Qt-4.6.1_32/lib/libQtDesigner.so
bool QScriptEngine::hasUncaughtException()const /tools/Qt-4.6.1_32/lib/libQtDesigner.so
QScriptContext*QScriptEngine::pushContext() /tools/Qt-4.6.1_32/lib/libQtDesigner.so
QScriptValue QScriptEngine::evaluate(const QString&,const QString&,int) /tools/Qt-4.6.1_32/lib/libQtDesigner.so
bool QScriptEngine::canEvaluate(const QString&)const /tools/Qt-4.6.1_32/lib/libQtDesigner.so
QScriptValue QScriptEngine::newArray(unsigned) /tools/Qt-4.6.1_32/lib/libQtDesigner.so
QScriptEngine::QScriptEngine()         /tools/Qt-4.6.1_32/lib/libQtDesigner.so
ld: fatal: Symbol referencing errors. No output written to builder
make[2]: *** [builder/builder] Error 1
make[1]: *** [builder/CMakeFiles/builder.dir/all] Error 2
make: *** [all] Error 2

我认为libQtScript.so.4必定缺失,所以我四处寻找,但它绝对存在。当我在libQtDesigner.so上运行ldd时,它表示它已正确链接到libQtScript.so.4。此外,它与libQtDesigner.so位于同一目录中。无论如何,我完全失去了。

有什么建议吗?提前致谢。

编辑:我想我发现了问题,但我不确定如何修复它。

我从libQtDesigner.so所在的目录运行ldd,它给了我这个输出。

$ ldd libQtDesigner.so
    libQtScript.so.4 =>      ./libQtScript.so.4
    libQtXml.so.4 =>         ./libQtXml.so.4
    libQtGui.so.4 =>         ./libQtGui.so.4
    libQtCore.so.4 =>        ./libQtCore.so.4
    ...

我没有先捕获它,但路径是相对的,这是一个问题,当我在任何地方,但同一目录。

我该如何解决这个问题?我是否需要重新编译Qt?

EDIT。我是个白痴。我的LD_LIBRARY_PATH

中有拼写错误

0 个答案:

没有答案