I think your problem is Exporting classes containing `std::` objects (vector, map etc.) from a DLL
The vector used inside of the DLL may not be the same as on the outside, even if the definition looks the same.
Also the inside could use a completely different STL.
When you link statically then you can be sure that everything uses the same definitions.
The "S" in STL may not be so Standard as you think it should be.