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

前端 未结 6 1715
名媛妹妹
名媛妹妹 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:02

    In addition to what has been said above, make sure that the Platform Toolset (under Properties->General) is identical in both projects. Otherwise the string content at the arriving side might be bogus.

    That happened to me when a console application project with v100 toolset version consumed a library that was set to v90.

提交回复
热议问题