首页| 论坛| 消息

回复: 【提问】qtextserialport使用出错
#6 [hrlixiang 01-16 11:30]
多谢回复, 我是在windows下用,是下载的qtextserialport,没有改动,
在include 它后,编译出的问题。
下面是qextserialbase.h:
#ifndef _QEXTSERIALBASE_H_
#define _QEXTSERIALBASE_H_
#include
#include
#include
#ifdef QT_THREAD_SUPPORT
#include
#endif
/*if all warning messages are turned off, flag portability warnings to be turned off as well*/
#ifdef _TTY_NOWARN_
#define _TTY_NOWARN_PORT_
#endif
/*QT3 changed some return types in QIODevice - these typedefs will retain compatibility with
earlier versions*/
#ifdef QTVER_PRE_30
typedef uint Offset;
typedef int Q_LONG;
#else
/*Some compilers (VC++) don't inherit this typedef from QIODevice.h - copied here*/
#ifdef _MSC_VER
#ifdef QT_LARGE_FILE_SUPPORT
typedef off_t Offset;
#else
typedef Q_ULONG Offset;
#endif //_MSC_VER
#endif //QT_LARGE_FILE_SUPPORT
#endif //QTVER_PRE_30
/*macros for thread support*/
#ifdef QT_THREAD_SUPPORT
#define LOCK_MUTEX() mutex->lock()
#define UNLOCK_MUTEX() mutex->unlock()
#else
#define LOCK_MUTEX()
#define UNLOCK_MUTEX()
#endif
/*macros for warning messages*/
#ifdef _TTY_NOWARN_PORT_
#define TTY_PORTABILITY_WARNING(s)
#else
#define TTY_PORTABILITY_WARNING(s) qWarning(s)
#endif
#ifdef _TTY_NOWARN_
#define TTY_WARNING(s)
#else
#define TTY_WARNING(s) qWarning(s)
#endif

/*simple MIN macro - evaluates to the smaller of the 2 members*/
#define MIN(a,b) (((a)
#7 [lord_jt 01-16 11:38]
你是用qt4嗎?
qtextserialport是base on qt3寫的,
.pro要加qt3support
#8 [hrlixiang 01-16 13:45]
我用的是4。0。1,不知道该怎么改啊。请指点
#9 [XChinux 01-16 15:29]
下面是引用hrlixiang于2006-01-16 13:45发表的:
我用的是4。0。1,不知道该怎么改啊。请指点
和7楼说的一样。
使用Qt3Support

<< 1 2 >> (2/2)

回复 发表
主题 版块