Closed GoogleCodeExporter closed 8 years ago
[deleted comment]
Hi RnD,
Seems there are something wrong with you. Once the library has been compiled
and installed to your computer through
qmake
nmake install
all you need is add following line to your project's file
CONFIG += extserialport
if your are using qmake and Qt Creator.
Or you can set the INCLUDEPATH/LIBS/DEFINES manully.
https://code.google.com/p/qextserialport/wiki/QextSerialPort_1_2_RC#Usage(2):Sha
red_Library
--------------------
BTW, the reason you encounter the error is that, qextserialport.h has been
added to your project as a in-project header file. Maybe you wrongly added
following line to your project's file
HEADERS += $pathtoqesp/qextserialport.h
or something similiar.
Original comment by dbzhang...@gmail.com
on 26 Dec 2012 at 3:34
I dont understand how to install qextserialport_1_2beta1
This is my pro file
QT += core gui
QT +=serialport
CONFIG += extserialport
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = baud
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
HEADERS +=Downloads/qextserialport-1.2beta1/
FORMS += mainwindow.ui
include(Downloads/qextserialport-1.2beta1/src/qextserialport.pri)
Error generted :
1)Downloads/qextserialport-1.2beta1/src/moc_qextserialport.cpp:14: error:
#error "This file was generated using the moc from 4.7.4. It"
2)Downloads/qextserialport-1.2beta1/src/moc_qextserialport.cpp:15: error:
#error "cannot be used with the include files from this version of Qt."
3)Downloads/qextserialport-1.2beta1/src/moc_qextserialport.cpp:16: error:
#error "(The moc has changed too much.)"
4)Downloads/qextserialport-1.2beta1/src/moc_qextserialport.cpp:81: error:
cannot convert 'const char*' to 'const QByteArrayData* {aka const QArrayData*}'
in initialization
5)Downloads/qextserialport-1.2beta1/src/moc_qextserialport.cpp:89: error:
conditional expression between distinct pointer types 'QDynamicMetaObjectData*'
and 'const QMetaObject*' lacks a cast
How to solve this problem
Original comment by sushantb...@gmail.com
on 20 Jul 2013 at 4:47
was this problem ever solved?
Original comment by hecht.t...@gmail.com
on 16 Oct 2013 at 9:21
The reason are the lines :
#ifdef Q_OS_WIN
Q_PRIVATE_SLOT(d_func(), void _q_onWinEvent(HANDLE))
#endif
in qextserialport.h
If compiled in Visual Studio, all works fine, if compiled with nmake (or jom)
you get the errors.
As workaround, I
- Added a precompiled header including "qextserialport.h" and "qextserialport_p.h" to the project
- removed the line
#include "moc_qextserialport.cpp"
in qextserialport.cpp
- removed the line
#include "moc_qextserialenumerator.cpp"
in qextserialenumerator.cpp
Original comment by narval...@gmail.com
on 6 Nov 2013 at 2:28
Original comment by dbzhang...@gmail.com
on 9 May 2014 at 7:57
Original issue reported on code.google.com by
R...@laxcoinc.com
on 25 Dec 2012 at 6:41