I want to add a simple function to a central place so that I can use it without having to include the header files over and over again. How do I accomplish it?
Consider the function
void foo() {
printf("Bar");
}
I tried adding this to a foo.h file and then including it in the prefix.pch file. But a compilation error occurs saying duplicate symbol.
Include your function in a separate class.
And include the header of that class to all of your classes.