Linker Warnings when linking against QExtSerialPort

24 views
Skip to first unread message

Mike Trahearn

unread,
Oct 12, 2012, 3:51:52 AM10/12/12
to qextser...@googlegroups.com
Dear Sirs,

Following your instructions when building against Qt5 beta1 I get the following Linker warnings - but only if I start actually using the library. I'm using Windows 7. Any Ideas?
To clarify, I have used Usage 1 (Building directly into source code), Usage 2 (installed Qt library) and Usage 2 (building local library) and have the same results. Building works fine. Installing in usage 2 works fine - I would actually love to use it as a qt dynamic library (not static).
But it is just the linker warnings which are worrying me. Should I build the library with some specific defines?

myclass.obj:-1: warning: LNK4217: locally defined symbol ??0QextSerialPort@@QAE@ABVQString@@W4QueryMode@0@PAVQObject@@@Z (public: __thiscall QextSerialPort::QextSerialPort(class QString const &,enum QextSerialPort::QueryMode,class QObject *)) imported in function "public: __thiscall MyClass::MyClass(class QObject *)" (??0MyClass@@QAE@PAVQObject@@@Z)
myclass.obj:-1: warning: LNK4217: locally defined symbol ??1QextSerialPort@@UAE@XZ (public: virtual __thiscall QextSerialPort::~QextSerialPort(void)) imported in function "public: virtual void * __thiscall QextSerialPort::`scalar deleting destructor'(unsigned int)" (??_GQextSerialPort@@UAEPAXI@Z)

MyClass::MyClass(QObject *parent) :
    QObject(parent)
{
    //modify the port settings on your own
    #ifdef Q_OS_UNIX
        port = new QextSerialPort(QLatin1String("/dev/ttyS0"), QextSerialPort::EventDriven);
    #else
        port = new QextSerialPort(QLatin1String("COM1"), QextSerialPort::EventDriven);  // If I comment out this line (i.e. I don't use the library, the linker warnings go away.) 
    #endif /*Q_OS_UNIX*/
}

Many thanks for any help on this matter.

Mike
Reply all
Reply to author
Forward
0 new messages