Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » how to import a exsiting makefile project(import for debugging)
how to import a exsiting makefile project [message #719643] Sun, 28 August 2011 02:43 Go to next message
Eclipse UserFriend
hi all,
I want to compile coreutils and debug it to learn something. I am a newby in Linux and c.
I download the source code from http://www.gnu.org/s/coreutils/ and use ./configure && make.
It compiles well. But I don't want to edit or read source code using vim or emacs(I am familiar with java development with eclipse ide). So I import the existing makefile project like this:
import -> c/c++ -> existing code as makefile project. tool chain for indexing is linux gcc.
It imports successfully. I can build it and it build following the instructions in makefile.
But when I open a c file such as tail.c. there are so many compiling errors. I found one is "type size_t can not be resolved". all the #include in the tail.c is correct. I find size_t is defined in stddef.h. and I found in argmatch.h of the project, it import this header file by # include <stddef.h>. and argmatch.h is #include by tail.c. Strangely, eclipse says the argmatch.h also can't resolve size_t! it seems I need more configure to tell eclipse how to locate source codes and header files. (/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include/stddef.h does exist and /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include is in the inlude path of this project)
Re: how to import a exsiting makefile project [message #719832 is a reply to message #719643] Mon, 29 August 2011 03:10 Go to previous messageGo to next message
Eclipse UserFriend
Eclipse did not index your project properly. You should try to rebuild your index (context menu of project and select Index->Rebuild). If it does not help then you should select Index->Search for inresolved includes to see which header files Eclipse cannot find.
Re: how to import a exsiting makefile project [message #719934 is a reply to message #719832] Mon, 29 August 2011 10:01 Go to previous message
Eclipse UserFriend
Index -> Rebuild is useless.
Index -> search for unresolved includes did tell me one error. it's io.h. and I found it should be sys/io.h. after I modify it. there is no unresolved includes.
but when I open tail.c, it's all of errors. it seems that the header files of the projects other than standard c library headers are not included by eclipse
Previous Topic:Launch failed,binaries not found
Next Topic:Code Completion problem on diffrerent project's header
Goto Forum:
  


Current Time: Fri Jul 18 07:39:26 EDT 2025

Powered by FUDForum. Page generated in 0.18084 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top