我尝试为Maya编译一个简单的cpp Qt类,并得到以下错误:
Undefined symbols for architecture x86_64:
"MQtUtil::toMString(QString const&)", referenced from:
MyMainWidgetClass::keyPressEvent(QKeyEvent*) in helixQtCmd.o
ld: symbol(s) not found for architecture x86_64
我有这个包括:
#include <maya/MQtUtil.h>
和这段代码:
void MyMainWidgetClass::keyPressEvent(QKeyEvent *e)
{
MGlobal::displayInfo(MQtUtil::toMString(e->text()));
}
但它在编译时失败了。知道为什么吗?
答案 0 :(得分:1)
该问题与Makefile中缺少的lib相关联:OpenMayaUI。