Why does this program crash: passing of std::string between DLLs

前端 未结 6 1719
名媛妹妹
名媛妹妹 2020-11-29 02:28

I have some trouble figuring out why the following crashes (MSVC9):

//// the following compiles to A.dll with release runtime linked dynamically
//A.h
class          


        
6条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-29 03:10

    This might be because the DLL and the EXE are compiled with different CRT settings. So when you pass a string, some resource conflict happens. Check your project settings for both the DLL and the executable.

提交回复
热议问题