4

I have a Eclipse workspace with several C projects: Project1, Project2, Project3, ... Project2, Project3, etc. all include a header from Project1. This header is heavy on preprocessor directives, such as:

#ifdef OPTION1
  typedef MY_INT int;
#endif

To make Eclipse find MY_INT in the code in Project2, Project3, I currently have to add the preprocessor definition OPTION1 for each project separately.

Is there a way to define OPTION1 globally, just once, for all the projects in the workspace.

alexc
  • 534
  • 2
  • 9
  • I doubt there is such an option (I can't find it). But I think it's better not to have it, because once you set it and forget, you will bash your head against the wall trying figure out how to get rid of these mysterious symbols defined nowhere. – Eugene Sh. Jul 15 '15 at 19:59
  • Defining it in your header from Project1, which you include in all your projects? – jwsc Jul 16 '15 at 07:19

1 Answers1

0

Short answer: no.

A bit longer: workspace may consist of many projects with completely different natures. Not all of them have preprocessor settings at all.