Skip to main content
 首页 » 编程设计

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

2022年07月19日183grandyang

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


本文参考链接:https://www.cnblogs.com/xihong2014/p/15214186.html
阅读延展