Reputation: 121
I have several .c files and I want to build, compile and edit this C code in Eclipse.
What is the best way to have these files added to my Eclipse IDE in order to compile the code?
Upvotes: 0
Views: 2295
Reputation: 16540
in general:
go to the 'Project Explorer' window
right click the project to be modified
click 'import'
in the 'import' window, open 'General' then click 'File System' then click 'next'
in the 'import'/File system window
use the 'From directory: 'Browse' button to select where the files to add are located
'drill in' to the the desired file(s) are displayed then click 'ok'
then click the check box to the left of each file to be added to the project
the next window will list all the files in the selected directory
click the check box to the left of each file to be added to the project
then click 'Finish'
The 'Project Explorer window will be re-displayed,
open your project (in the 'Project Explorer' window so each of the file names is displayed.
The files you added will be there
HOWEVER, they will be considered linked resources.
To make them part of the source and header files for the project, copy them to the (your project name) directory in the eclipse work space
Upvotes: 2