In reply to Praseetha:
You cannot declare two different unpacked struct typedefs with the same name and expect them to be compatible. Declare the typedef once and put it in a package to share. See this post. (Same principle applies to classes and structs)