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