Unable to pass std::wstring across DLL
问题 I've set up a project in Visual Studio 2010 to write unit tests against an existing MFC DLL. I'm using a single-header unit test framework, and linked to the MFC DLL's lib wrapper from the unit test project. I'm trying to construct a class that takes a std::wstring in it's constructor. Here's what my test looks like: TEST_CASE("MyProject/MyTest", "Do the test.") { MockDbService mockDbService; Foobar foo(L"{F00DFACE-FEED-DEAD-BEEF-C0FFEEDECADE}", mockDbService); foo.loadObject(); REQUIRE