In an attempt to export functions from my dll I'm getting error C2526: 'LoadFromFile': C linkage function cannot return C++ class. I'm using extern "C" to unmangling function names.
Dll's header file:
extern "C" __declspec(dllexport) std::unordered_map<std::string, std::string> LoadFromFile(const std::string& path);
I could always pass a pointer to an std::unordered_map in the arguments, but is there a workaround for this?
I thought about using the offsets in the map file, but I figure it would be unreliable as significant changes would change those offsets. Or return to using /EXPORT in the command line.