Thanks Josh,
It works.


From: Josh Faust <jfaust@willowgarage.com>
To: User discussions <ros-users@code.ros.org>
Sent: Thursday, October 7, 2010 5:32:06
Subject: Re: [ros-users] Communicating between two user created packages


undefined reference to `my_namespace::X::X()`


You need to add the linker flags to the exports as well.  For example, from roslib:
lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -lroslib"

Josh