I am having problem linking a dynamic library (.dylib) with an executable. I have following setup

1. I have a dynamic library created as “C++ Standard Dynamic Library” in xCode

2. I have an executable created as Command Line Utility->C++ Tool in xCode. I intend to link the dynamic library with this executable

3. I can call any method of any class of the dynamic library from the executable if and only if the method is declared and defined in .h file

4. When I try to call any method which are declared in .h file but defined in .cpp file, I get linking errors which says “Symbol(s) not found”

Appreciate your help on the same.