qspinbox64 build for windows

喜你入骨 提交于 2021-01-28 12:02:12

问题


In an earlier question, I was trying to create a QSpinBox64 class. After following the hints from the answer, the code worked on linux. However, when building on Windows, a number of errors occur:

moc_qspinbox64.obj:-1: error: LNK2001: unresolved external symbol "public: static struct QMetaObject const QAbstractSpinBox::staticMetaObject" (?staticMetaObject@QAbstractSpinBox@@2UQMetaObject@@B)
moc_qspinbox64.obj:-1: error: LNK2019: unresolved external symbol "public: static struct QMetaObject const QWidget::staticMetaObject" (?staticMetaObject@QWidget@@2UQMetaObject@@B) referenced in function "public: static class QString __cdecl QWidget::tr(char const *,char const *,int)" (?tr@QWidget@@SA?AVQString@@PEBD0H@Z)
moc_qspinbox64.obj:-1: error: LNK2019: unresolved external symbol "public: static struct QMetaObject const QAbstractButton::staticMetaObject" (?staticMetaObject@QAbstractButton@@2UQMetaObject@@B) referenced in function "public: static class QString __cdecl QAbstractButton::tr(char const *,char const *,int)" (?tr@QAbstractButton@@SA?AVQString@@PEBD0H@Z)

There are a lot of errors of this type.

Environment settings related to the QT:

  • QTDIR C:\Qt\5.15.2\msvc2019_64
  • QTJAVA C:\Program Files (x86)\QuickTime\QTSystem\QTJava.zip
  • QtMsBuild C:\Users\Yota\AppData\Local\QtMsBuild

QT under Windows I installed from the official website

How to avoid these errors when building under Windows?

来源:https://stackoverflow.com/questions/65704129/qspinbox64-build-for-windows

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!