Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] how to import an exsiting makefile project

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 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) 

Back to the top