Linking errors while exporting std::vector from dll
问题 I have a dll ( my_library.dll ) that exports a struct using __ declspec(dllexport) . Since this struct contains an std::vector<std::wstring> member , I've also exported functions for it like so: template class __declspec(dllexport) std::allocator<std::wstring>; template class __declspec(dllexport) std::vector<std::wstring>; Please note that I've defined macros such that dll exports above struct and vector when compiling and they are imported (via __declspec(dllimport)) when the dll is being