QextSerialPort compiled Guide

Compiler environment:
1, 1.1 qextserialport
2, QT 4.3.2
3, VC ++ 2003


1. In the official website to download the latest version of QextSerialPort qextserialport-1.1.tar.gz, extract to qextserialport-1.1 directory.
2. The qextserialport in qextserialport-1.1 catalog copy src Qt installation directory under the directory
3. Enter qextserialport directory under the src directory, enter the following command to compile:
 qmake
 nmake
4. then available qextserialport.dll, qextserialport.prl, libqextserialport.a three files in the build directory under qextserialport directory, copy qextserialport.dll to Qt bin directory under the installation directory, copy qextserialport.prl, libqextserialport.a lib directory to the Qt installation directory. ( Default typically generated DLL and PRL, see Appendix generating step LIB )
5. Qt installation directory under the directory include directory in the new file qextserialport.h Qt, contents of the file:
#include "HTTP: //www.cnblogs. com / src / qextserialport / qextserialport.h "
And copy the file to the Qt installation directory under QtGui include directory under the directory, and then create a new file QextSerialPort (no extension) in the directory, the contents of the file:
#include "qextserialport.h"
6. The src / qextserialport directory example directory copied to other parts of the hard drive, delete Makefile.Release in the examples directory, Makefile, Makefile.Debug, README and QESPTA.pro several files.
7. Open the directory examples and QespTest.cpp main.cpp file, modify #include <qextserialport.h> as #include <QextSerialPort>
8. The compiler comes EXAMPLE: EXAMPLE enter the directory, enter:
 the Qmake -project
obtained project file qespta .pro, open the project file, if the current system is win32, the statement added:
 LIBS + = -lqextserialport
 win32: DEFINES = _TTY_WIN_ QWT_DLL QT_DLL
If the current system is unix / linux, the statement added:
 LIBS + = -lqextserialport
 UNIX: DEFINES = _TTY_POSIX_
9. compilation
 qmake
 nmake
if compiled successfully proved successful has been extended
10. The extended help file is located in src / qextserialport directory, available for inspection
note this extension method will extend to the next class QextSerialPort QtGui, do not like QextSerialPort mistaken for a part of QtGui

Appendix: how to generate qextserialport.lib .
qmake default is to generate a dynamic version of the library, statically linked file generation needs to be modified qextserialport.pro. (See on qmake Parameters: http://www.cppblog.com/mydriverc/articles/32728.html  )
. 1, open qextserialport.pro
2, modified
CONFIG + = warn_on qt thread
is
CONFIG + = warn_on qt thread staticlib

Reproduced in: https: //www.cnblogs.com/leaway/archive/2008/03/13/1104562.html

Guess you like

Origin blog.csdn.net/weixin_34186931/article/details/93840439