问题描述
- Qt 交叉编译出现moc文件报错
-
moc_QtMqttclient.cpp:52: error: no 'void QtMqttclient::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)' member function declared in class 'QtMqttclient'
moc_QtMqttclient.cpp:68: error: 'const QMetaObjectExtraData QtMqttclient::staticMetaObjectExtraData' is not a static member of 'class QtMqttclient'
moc_QtMqttclient.cpp:70: error: argument of type 'void (QtMqttclient::)(QObject*, QMetaObject::Call, int, void**)' does not match 'int (*)(QMetaObject::Call, int, void**)'
moc_QtMqttclient.cpp:74: error: 'staticMetaObjectExtraData' was not declared in this scope
在linux上编译没有报错,但是在进行交叉编译的时候却报错了,moc文件不是自动生成的吗,为啥会出现这样的问题啊
解决方案
可能是声明的问题吧,这种错误没遇到过。
时间: 2024-12-25 20:45:50