asio2封装DLL的过程de问题及解决

 

1、定义 asio2::tcp_client client 全局变量后,导致 无法进入程序的调试

 

2、封装dll后,Demo.exe 程序Release能运行,但Debug模式无法运行,也无法进入调试

  

 

 查询网络 Expression: _acrt_first_block == header 

https://stackoverflow.com/questions/35310117/debug-assertion-failed-expression-acrt-first-block-header

 In particular, the exe should be compiled and linked with /MD[d] and the library with /LD[d] or /MD[d] as well, neither one with /MT[d]. 

 

 原来:debug模式下,dll工程的设置为 /MTd                解决: 改为 MDd

                          demo工程的设置为     /MDd

            Release模式  dll工程的设置为  /MT

                          demo工程的设置为     /MD

 

posted on 2021-09-01 13:05  xihong  阅读(189)  评论(0)    收藏  举报

导航