Laurent Crivello
Laurent Crivello

Reputation: 3931

Undefined symbols for architecture x86_64 : MqtUtil

I try to compile a simple cpp Qt class for Maya, and get the following error:

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

I have this include:

#include <maya/MQtUtil.h>

and this code:

void MyMainWidgetClass::keyPressEvent(QKeyEvent *e)
{
    MGlobal::displayInfo(MQtUtil::toMString(e->text()));
}

but it fails at compilation. Any idea why ?

Upvotes: 0

Views: 129

Answers (1)

Laurent Crivello
Laurent Crivello

Reputation: 3931

The issue was linked to a missing lib in the Makefile: OpenMayaUI.

Upvotes: 1

Related Questions