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.
- file-> New-> makefile project with existing code
- 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.
- Project-> make target-> create, create two targets: All and clean.
- select all for the project you just created in the View of make target to build the project
- 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:
- Http://dev.eclipse.org/mhonarc/lists/photran/msg00926.html
- Http://blog.csdn.net/kevin_zqw/article/details/6927151
-
For more information, see csdn (zhongchao): blog.csdn.net/poechant.
-