QT is a standard development tool of ked. It uses C ++ as the development language and has object-oriented features. Here we will introduce how to compile and install QT using mingw in windows.
1. We can download an open-source development version from the official QT website. Here we recommend the download site in China. There are various available versions to download, and has a good speed. qt Chinese Forum: http://www.qtcn.org/bbs.
2 download mingw, In our example, we are using a Dev-Cpp4.9, you can use the default options for installation, so we can use mingw.
3. decompress the downloaded QT source package to a directory. Note that this directory cannot contain any spaces. for example, we put it in the QT directory of the D Drive and rename the extracted directory to 4.1.2.
4. Add environment variables: add the bin directory in the source package to the PATH variable of our system. Right-click my computer and choose advanced> environment variables to set the environment variables. for example, in this case, we can add D:/QT/4.1.2/bin.
5. Add the mingw environment variable and add the bin directory under our Dev-CPP directory to our environment variable path. If our Dev-CPP is installed in C: in the/dev-CPP directory, we can add C:/dev-CPP/bin.
6 Configuration:
In the command line window, go to the 4.1 directory, and enter the following command for compilation Configuration:
Configure-platform win32-g ++-QT-GIF-QT-SQL-mysql-plugin-SQL-ODBC-I c:/dev-CPP/include-L C: /dev-CPP/lib
Here we specify the platform parameter as win32-g ++, that is, we need to use this compiler during this compilation process to enable GIF and MySQL support, use-I to specify the header file used for compilation, and use-L to specify the library file directory used for compilation.
In this way, our system can be checked and configured according to our requirements.
7. Compile:
After the configuration is complete, we enter the following command for compilation: mingw32-make
After this operation, we have installed QT on windows, so that we can perform Qt in windows. Program.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service