pafra88 / qextserialport

Automatically exported from code.google.com/p/qextserialport
Other
0 stars 0 forks source link

Cannot link on a MacOSx 64 machine #151

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Which version of QextSerialPort are you using?
 1.2 beta 2

What steps will reproduce the problem?

Create a project with a main window on a MacOSX 64 bit machine.  Add the 
following into the header of that main window file.

#ifndef QCONTROLLER_H
#define QCONTROLLER_H

#include <QMainWindow>

namespace Ui {
class QController;
}

class QTimer;
class QextSerialPort;

class QController : public QMainWindow
{
    Q_OBJECT

public:
    explicit QController(QWidget *parent = 0);
    ~QController();

protected:
    //void changeEvent(QEvent *e); //Linker errors

private slots:
    /*void onPortNameChanged(const QString &name); //Linker errors
    void onBaudRateChanged(int idx);
    void onParityChanged(int idx);
    void onDataBitsChanged(int idx);
    void onStopBitsChanged(int idx);
    void onQueryModeChanged(int idx);
    void onTimeoutChanged(int val);
    void onOpenCloseButtonClicked();
    void onSendButtonClicked();
    void onReadyRead();*/

private:
    QTimer *timer;
    QextSerialPort *port;
    Ui::QController *ui;
};

If I uncomment any of those functions I get the error

  "QController::onOpenCloseButtonClicked()", referenced from:
      QController::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)in moc_qcontroller.o
ld: symbol(s) not found for architecture x86_64

I have done a really clean and that does not help.  Building the examples works 
fine.

Original issue reported on code.google.com by markcgri...@gmail.com on 27 Oct 2012 at 9:16

GoogleCodeExporter commented 8 years ago
Yes, you must have a qcontroller.cpp which contains the definition of these 
member functions.

By the way, it is not a good idea to let your own class starts with 'Q' ;-)

Original comment by dbzhang...@gmail.com on 29 Oct 2012 at 1:05

GoogleCodeExporter commented 8 years ago

Original comment by dbzhang...@gmail.com on 13 Nov 2012 at 8:21