+1  A: 

Add the Foundation framework to your project and to the Link Libraries build phase in your target. The easiest way to do the latter is to Get Info on the target; there's a list of linked libraries on the General tab of that window.

Peter Hosey
Thanks for your response. Linking against the Foundation framework will solve the problem but I don't want to link Foundation framework to my Command line tool. I intended to develop Command line tool as platform independent. The static library will be platform specific. I am trying to figure out how to avoid linking Foundation framework in command line tool.
Devara Gudda
A: 

Hey,

I just ran into this. Did you find a soution yet?

Measunny
I did not find any exact solution but I overcome this by making my library as dynamic instead of static. The error may be happening because the symbols like _NSMutableArray are there in foundation library which is loaded at runtime. So those symbol informations are not available in static library and when you link static library from other app you will get error.
Devara Gudda
ok thank you. I can't create a dylib so it seems as I have to link Foundation.... Thanks for your answer!
Measunny