gpt4 book ai didi

c++ - qscintilla2 : Undefined symbols for architecture x86_64

转载 作者:行者123 更新时间:2023-11-30 05:12:59 25 4
gpt4 key购买 nike

我有一个静态 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)

最佳答案

Qt静态构建时需要在*.pro文件中添加QT += macextras。我不知道为什么,但是当程序是在公共(public)共享的 Qt 中构建时,它可以在没有这个 ma​​cextras 的情况下工作。

关于c++ - qscintilla2 : Undefined symbols for architecture x86_64,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44194770/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com