thanks to @ousado, extern classes should be used instead of Dynamic typedefs