I think your problem is that you have a space after -Wl, -- it'a all one argument: -Wl,-export-dynamic