Now we see the third version of this article. The reason for writing this blog post is that this dish is recently prepared to use qwt to develop some functional components, and the company basically uses Win XP for development, to facilitate future team development, we studied how to integrate the qwt library and qtcreator. However, due to her lack of rigorous attitude, I wrote a blog post easily after the experiment was successful and I felt that integration was okay. Thanks to shiroki, and even serious errors may mislead others. Through the unremitting efforts and research on the weekend, we finally achieved the experiment results and confirmed the ideas of this dish. In addition, we have a better understanding of QT and supplemented the previous knowledge points we lack, it is also truly achieved. In the qwt trial, shiroki introduced how to install qwt in Linux. This course has been continuously attempted in the WINXP operating system, it is found that QT creator can be used for compilation quickly, while QT creator can also be used for program development. Therefore, we will introduce it in detail.
First, make sure that you are using the WINXP operating system and have installed qt sdk for Windows. If not, you can download the installation package from the official QT website. The installation process is very simple, there is no big difference with the general windows EXE installation package. After specifying the path, you can install the package one by one. After the installation is complete, you can use it to compile the QT program without setting environment variables.
After installation, you can use qtcreator, and then download the source code of qwt, the current version is the qwt-5.2.0, in the previous article provided the project home address, on the project homepage, you can download the tar source code package for Linux or the zip source code package for Windows. We naturally choose the zip package. After the download is complete, decompress the directory in the English path.
With qt sdk, the compilation process of qwt is naturally very simple. environment variables, QT lib libraries, and everything has the help of qt sdk, this is why I want to say that qwt is installed in a silly way. Compared with previous compilation, installation and setting of environment variables, QT creator can help simplify the process.
Open QT creator, open the. Pro project file under the qwt source code directory, and click the run button in the lower left to start the automatic compilation process:
The compilation process takes 5 to 10 minutes. You can sit down or have a cup of coffee or something >_< and QT creator helps us do everything well, we only need to wait for the compilation to complete.
After compilation, you can use qtcreator on WINXP to compile qwt-related programs and use the components of qwt in QT designers. Under the compiled qwt directory, there are lib and designer directories, copy the qwt5.dll file in the lib directory to the bin directory of the QT directory under the qt sdk directory (for example, this dish is F:/QT/2009.03/QT/bin ), copy the libqwt5.a file to the corresponding lib directory (for example, F:/QT/2009.03/QT/LIB), and finally copy the designer directory under the plug-ins directory under the designer directory) copy the libqwt_designer_plugin5.a file and qwt_designer_plugin5.dll file to the designer directory (for example, F:/QT/2009.03/QT/plugins/designer) under the Plugins directory corresponding to the above file, which looks very tedious and, it is actually a very simple process.
Well, it would be nice to use it like this. It would be a silly installation. It would be very easy to compile and copy the library files...
But it is counterproductive. All these are just the beginning of the shap, and the real depth is still behind. The above steps can be considered as the process of preparing the qwt database, there are still very important steps to write qwt. This course will be detailed in the next article. If you want to use qwt on WINXP, please follow these steps first.