0

Hi I'm using Qt to create a Minesweeper game in macOS, and whenever I wrote some signals and slots to my classes my app won't compile. Qt says ld: symbol(s) not found for architecture x86_64 So here's my code:

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);

};

I've seen many questions similar to mine but I was not able to solve this. I tried adding CONFIG -= x86_64 but it's still not working. And I know it's the MOC thing but I don't know how to solve it. Someone help me please!

Allen
  • 189
  • 2
  • 11

1 Answers1

0

I happened to have finally found the solution on this page: Qt Creator: Undefined symbols for architecture x86_64 I tried and it worked. But I'm not sure it's completely correct so anyone holding different opinions Please post an answer here.

Community
  • 1
  • 1
Allen
  • 189
  • 2
  • 11