Eclipse CDT import the C/C ++ project built by makefile

Source: Internet
Author: User

Eclipse CDT import the C/C ++ project built by makefile
    • Author: Liu Da-poechant (Zhong Chao)
    • Email: zhongchao. USTC # gmail.com (#-> @)
    • Blog: blog.csdn.net/poechant
    • Date: June 30Th, 2012

I use eclipse CDT on Mac OS X. The Linux and Windows versions are similar. Generally, the preference location is different.

    1. file-> New-> makefile project with existing code
    2. select the source code directory and C language. For a Linux environment, select Linux GCC and Mac, and select MacOSX GCC. For Windows, use eclipse to select mingw GCC.
    3. Project-> make target-> create, create two targets: All and clean.
    4. select all for the project you just created in the View of make target to build the project
    5. after building, run-> debug as-> Local C/C ++ application-> GDB/MI. You can set debugging options in debug configuration.

The differences between GDB/MI and GDB are as follows:

GDB and GDB/MI are essentially the same, doesn't that GDB/MI lets youselect the MI Protocol version and command set to use (mi-or machine interface-is how eclipse communicates with GDB, rather than using the normal GDB command-line interface ). this is useful if you want to do something not supported by the defaults, or have a non-standard GDB, such as used on Mac OS X. gdbserver is a very lightweight debug serverused for debugging embedded systems. ** the normal GDB/MI commands are used, but GDB must be told to connect to a gdbserver running on a remote system. ** there's an extra tab for specifying this information.

Reference:

    1. Http://dev.eclipse.org/mhonarc/lists/photran/msg00926.html
    2. Http://blog.csdn.net/kevin_zqw/article/details/6927151

-

For more information, see csdn (zhongchao): blog.csdn.net/poechant.

-

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.