In a Objective-C project I am using a static library, compilation of this static library depends on some preprocessor macros to be set.
When I set these macros in the project depending on the library the library does not see them. But when I set them in the library project it does work.
Since I want to reuse this library for other projects, I require to set the preprocessor macros for each project depending on the library separately. Is there a solution for this?
Preprocessor maros only have any meaning at compile-time, so any library you build will be specific to the values of these preprocessor macros at the time you built the library. You will either need lots of different versions of your library, built with the different possible values of your preprocessor macros, or you could switch to using a different method to control the behaviour of your library code which will work at run-time, e.g. setting some appropriate parameters through the library API.