The simplest configuration of qt4 for Dev-CPP

Source: Internet
Author: User
// ================================================ ========================================
// Title:
// The simplest configuration of qt4 for Dev-CPP
// Author:
// Norains
// Date:
// Monday 5-November-2007
// Environment:
// Windows XP
// ================================================ ========================================
There are a lot of articles on how to configure the QT environment in Dev-CPP, but almost all of them need to set environment variables, and then command line compilation, or some steps are unnecessary after the QT version is updated, in all these cases, my eyes are dizzy, and I am also a kind of lazy person. Looking at the steps that need to be done, I really don't want to spend my mental power on practice. however, the times are constantly improving. After the version is updated, the installation seems not as complicated-at least relative to the previous one.

In order to prevent friends from following the instructions in this article, we will clarify the weapons and versions used in this article at the beginning of this article:

Dev-CPP
Version: 4.9.9.2
Download Page: http://www.bloodshed.net/dev/devcpp.html
: Http://sourceforge.net/project/downloading.php? Groupnameincludev-cpp&filename=devcpp-4.9.2_setup.exe & use_mirror = nchc

Qt
Version: 4.3.2 opensource mingw
: Http://www.qtcn.org/download/qt-win-opensource-4.3.2-mingw.exe

Qt4 for Dev-CPP templates
Download Page: http://download.csdn.net/source/277992

It is explained here that QT does not download the source code of QT, because I am very lazy and belong to the type used for use, it is hard to imagine that you will download the QT source code and then spend six hours to compile it. Therefore, you can directly download the compiled version here, saving time and effort for installation. if you download the source code, there are a lot of tutorials on the Internet that tell you how to do the next step. Here, you will not install experts to create the wheel.

After the three weapons are ready, let's start trial.

1. Install Dev-CPP
I am too lazy to explain the compiler link. I chose yes directly (I don't know what the result will be when I select no ?), After selecting vc6.0, you can still compile it normally. Install Dev-CPP on D:/ProgramFiles/dev-CPP.

2. Install QT
There is nothing to say about it. Just like the previous one, double-click the mouse. The difference is that the mingw path should be selected during the installation process and the dev-CPP installation path should be directly selected, here I chose D:/ProgramFiles/dev-CPP. there is a long decompression process. It may take several minutes. I forgot to mention that I installed QT on D:/ProgramFiles/QT.

3. Install qt4 for Dev-CPP templates
There is nothing to do with this installation. You just need to decompress it and copy it to the Templates folder of Dev-CPP. this thing I uploaded according to the hangxin1940 template resource rewrite, can be said to be the ultimate version of it (thanks again hangxin1940, By the way to help him pyramid scheme, his download of this template resource is located in: http://download.csdn.net/source/219376 ). however, since the path of this tool corresponds to my previous QT path, you need to change the QT path in the three templates files in the compressed package after downloading it. I am writing D:/ProgramFiles/Qt here. You only need to set the installation path for your own QT. this is quite simple. use NotePad to open the three files and replace D:/ProgramFiles/QT with C: /program files/QT/4.3.2 or anything else.

Well, now we run Dev-CPP, and we will see that the QT project is naturally exposed to a sharp angle (1 ):

If you have followed the previous steps to practice, you can now click the hello World project, click the complie In the dev-CPP menu to compile a simple but classic-looking Hello World (2 )!



4. The system prompts that no dynamic library is found during running.
Perhaps when I was very happy to compile the QT project and were excited to run the program, an unfortunate and harsh prompt would appear: XXXXX was not found, so the application could not be started, re-installing the application may fix this problem. it's okay. I have never seen such a scene. Isn't it a lack of dynamic link libraries? Find the corresponding DLL file in the binfile under the QT installation directory and copy it to the project directory. of course, if you copy all DLL files in the bin folder to Windows, you do not need to copy the dll library every time you create a file.


Everything is so simple, there is no need to set environment variables, or to compile a program using the command line, everything is as beautiful as you click the mouse .:-)

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.