0

I'm new to Eclipse, having done a lot of development in Visual Studio and XCode.

When I create a C++ project in my source tree the project explorer shows all the files in that folder and sub-folders. However there are lots of unrelated files that I don't want to see.

In Visual Studio and XCode I have to manually link source code to the project. This allows me to control the clutter of the project. Non-project files are "hidden" by default, because they aren't added to the project. In Eclipse everything is added by default. It seems that you can't decouple the file system's storage from the view you see in the project explorer.

Also I have a bunch of source in my tree that I don't want to compile as part of this project. Because it's for a different platform. I can't see how to remove these files from the compile list without also removing them from the file system.

Reading the docs hasn't helped much. What am I missing here?

fret
  • 1,542
  • 21
  • 36

1 Answers1

1

There are 2 parts to this solution. First file name filters can be defined as described in this post: Eclipse: how to hide custom files in Project Explorer

2nd the remaining files that I don't want compiled can be excluded by right clicking on them and Properties -> C++ build -> Exclude resource from build.

So it's more a negative space thing. In traditional systems, you have to explicitly add code to the project. In Eclipse you have to explicitly REMOVE code from the project. I prefer the old way because sometimes you want to include code from disparate regions on the disk and that just makes the all inclusive model of eclipse break. But I guess I'll cross that bridge when I get to it. sigh

Community
  • 1
  • 1
fret
  • 1,542
  • 21
  • 36