Mac上的Qt显示符号未在架构x86_64中找到
Qt on Mac saying symbol(s) not found for architecture x86_64
嗨,我使用Qt在macOS上创建扫雷游戏,每当我为我的类编写一些信号和插槽时,我的应用程序就不会编译。Qt表示ld: symbol(s) not found for architecture x86_64
下面是我的代码:
enum Status {
virgin,
flagged,
questioned,
revealed
};
class Cell : public QLabel
{
Q_OBJECT
public:
int atRow;
int atCol;
int content;//0 - 8 means the numbers of mines around the cell. -1 means it's a mine itself.
bool isMine;
Status status;
Cell(int atRow, int atCol);
Cell *NorthWest,
*North,
*NorthEast,
*East,
*SouthEast,
*South,
*SouthWest,
*West;
public slots:
void mousePressEvent(QMouseEvent *event);
};
我见过很多类似的问题,但我没能解决这个问题。我试着添加CONFIG -= x86_64
,但它仍然不起作用。我知道这是MOC
但我不知道怎么解它。谁来帮帮我!
我碰巧终于找到了这个页面的解决方案:Qt Creator:架构x86_64的未定义符号我试过了,成功了。但我不确定这是完全正确的,所以有不同意见的人请在这里发表答案。
相关文章:
- Qt VTK交互风格的信号到小部件
- QT在错误的班级中寻找空位
- 如何在选项卡视图Qt中设置一个新项目,并保存以前的项目
- 如何在Qt窗口小部件中使用QStringView(或QStringRef)
- 如何在Qt C++中更改光标
- 如何在MS Visual Studio 2019中运行QT UI
- QT通过C++添加映射QML项目
- libssh 的函数在构建 libssh 时无法在 Qt 和 cmake 错误中找到
- 如何将点击的信号和插槽添加到qt中的自定义按钮中
- Qt C++静态thread_local QNetworkAccessManager是线程应用程序的好选择吗
- 使用Qt C++计算类似Git的SHA1哈希
- Qt focusObjectChanged example?
- 如何在cpp文件之间切换窗口?在Qt中
- Qt和C++:将QLineEdit添加到QTabWidget中
- 从数据库实时显示QT c++中的数据
- 为x86而非x64编译时出错
- Qt Quick-如何仅从c++代码与qml属性交互
- 无法使用Qt Creator在Windows中构建yaml-cpp
- LNK1112:模块计算机类型"x64"与目标计算机类型"X86"冲突:Qt创建者
- QT 5.6.1应用程序仅在x86 arch上退出插槽后崩溃,而不是x64