As you have included no code this is only a guess: If you declare a global variable in an (Objective-)C file then the compiled binary will have that global variable as a public symbol. If you use the same name for globals in different files and then try to combine the compiled binary into the same application you will get a duplicate symbol error from the linked/loader (the ld
in your error).
(Note that this is nothing to do with the visibility of the two variables at the language level, without taking steps to make the variables visible when compiling a file the compiler will not allow you to reference a variable in another file as it simply won't see it.)
To prevent a variable defined with global scope having a public symbol associated with it you can add the modifier static
to its declaration. This limits the visibility of the variable to just that file, both at the language and compiled binary levels.
Response to Comment
Your variables are not instance variables, you would not get the error you have if they were. So my guess was wrong, you have instead incorrectly declared your instance variables. This is why you should always include your code when asking questions. All I can do is guess again. This is what instance variable declarations should look like:
@implementation SomeClass
{ // open brace indicates start of instance declarations
int birdCount; // an instance variable
// ...
} // close brace, end of instance variables
// methods...
@end
Have you missed out the braces? If you have then you have declared global and not instance variables.
If this guess is still wrong edit your question and add your code! You are lucky the SO community hasn't closed your question, you need to help people help you.
HTH