c++ - 体系结构 x86_64 : MqtUtil 的 undefined symbol

标签 c++ qt maya undefined-symbol

我尝试为 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()));
}

但是它在编译时失败了。知道为什么吗?

最佳答案

该问题与 Makefile 中缺少的库有关:OpenMayaUI。

关于c++ - 体系结构 x86_64 : MqtUtil 的 undefined symbol ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29554300/

相关文章:

python - 删除表达式编辑器中的所有表达式

qt - qt 中的 setSectionResizeMode 有什么问题?

c++ - QDialog::accepted() 插槽不工作

python - 如何从选择中获取边缘索引?

c++ - Visual C++ - 检测程序是否加载到可视化调试器中

c++ - QVariant 只接受 QList 而不是 QVector 或 QLinkedList 是有原因的吗

python - 导入时对象的名称

C++ 有人知道更多关于这种指针的信息吗?

c++ - 将 OpenGL 窗口添加到 GTK 构建器中

c++ - Visual Studio 2012 是否正确执行此操作?标准::移动