qscintilla2:体系结构x86_64的未定义符号

时间:2017-05-26 06:11:13

标签: c++ macos qt qscintilla

我有一个静态Qt并在macOS 10.12.4上重新编译了qscintilla2_qt5.a(2.10)。当我编译我的项目时,它会打印出这个错误:

Undefined symbols for architecture x86_64:
  "qRegisterDraggedTypes(QStringList const&)", referenced from:
      initialiseRectangularPasteboardMime() in libqscintilla2_qt5.a(MacPasteboardMime.o)
  "QMacPasteboardMime::count(QMimeData*)", referenced from:
      vtable for RectangularPasteboardMime in libqscintilla2_qt5.a(MacPasteboardMime.o)
  "QMacPasteboardMime::QMacPasteboardMime(char)", referenced from:
      initialiseRectangularPasteboardMime() in libqscintilla2_qt5.a(MacPasteboardMime.o)
  "QMacPasteboardMime::~QMacPasteboardMime()", referenced from:
      RectangularPasteboardMime::~RectangularPasteboardMime() in libqscintilla2_qt5.a(MacPasteboardMime.o)
      RectangularPasteboardMime::~RectangularPasteboardMime() in libqscintilla2_qt5.a(MacPasteboardMime.o)
  "typeinfo for QMacPasteboardMime", referenced from:
      typeinfo for RectangularPasteboardMime in libqscintilla2_qt5.a(MacPasteboardMime.o)

1 个答案:

答案 0 :(得分:1)

当Qt静态构建时,需要在* .pro文件中添加 QT + = macextras 。我不知道为什么,但是当程序是在普通共享的Qt中构建时,它没有 macextras