Integrate qtcreator with eclipse CDT and solve related problems

Source: Internet
Author: User

This article describes the integration of qtcreator and eclipse CDT. Qtcreator is a new IDE provided by Nokia for developing QT programs. It is still in beta version. Qtcreator will install mingw and QT libraries, which can be easily integrated into eclipse CDT ide without having to download the QT Development Kit and mingw compiling environment. In addition, let's take a look at the problems and solutions encountered during use.

Download and install (my version ):

  1. Qtcreator-0.9.1-beta-windows-setup.exe
  2. Eclipse-cpp-ganymede-SR1-win32.zip
  3. Qt-eclipse-integration-win32-1.4.3.exe

The above 1 will install qtcreator, while the mingw and QT libraries will be installed at the same time.

2. Eclipse CDT and 3 is the Eclipse plug-in of QT. After installing this plug-in, you can use Qt in eclipse CDT by slightly configuring the mingw and QT library paths. My paths are as follows:

C:/QT/qtcreator/mingw, C:/QT/qtcreator/QT

Now, you can use qtcreator ide or eclipse cdt ide, depending on your preferences.

The following describes the problems encountered when running the QT program in eclipse CDT:

Question 1The make command cannot be found.

After installing the QT plug-in, you can run C:/Eclipse/start. BAT to start eclipse that supports QT. Otherwise, you cannot compile the QT program after running eclipse directly.

[Solution] After adding C:/QT/qtcreator/mingw/binto the system environment variable, you can run eclipse.exe directly using start.bat. if the make command cannot be found during compilation, you can modify it as follows: find the mingw32-make.exe file. The default path is C:/QT/qtcreator/mingw/bin/mingw32-make.exe. Replace the value with make.exe. When you do not need to change the name directly, qtcreatorstill uses mingw32-make.exe. Of course, you can also configure eclipse cdtto directly use mingw32-make.exe. This practice is not used in this article.

Question 2When using mingw GDB to debug the QT program in eclipse CDT, an error is reported.

GDB: unknown target exception 0xc0000135 at 0x7c984ed1

You can't do that without a process to debug.

But there is no problem when running the program directly.

[Solution] The problem is that the DLL dependent on the EXE cannot be found. Although the PATH variable has been configured in the debug configurations of the program in eclipse, it does not work when running in debug mode somehow. The solution is to add the path C:/QT/qtcreator/QT/bin to the path environment variable of the system.

After the above problem is solved, you may encounterAnother problem: The program always stops at a function of NTDLL without entering the main function. For example:
7 NTDLL! Ldraddrefdll () 0x7c92ebab
The solution is: Open debug configurations of the program and modify debugger options: do not select "load shared library symbols automatically ".

Related Article

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.