我想测试下面的函数与std :: async为静态类,我的主要目的是等待,直到函数执行。但我面临着以下错误。有人可以给我一个这个错误的原因。异步函数中的错误
IASD* ASDInterface = getASD();//gets the instance corrcet and tested function successfully
auto habnd = std::async(std::launch::async, &IASD::handle_request, ASDInterface ,arb_id, sid, data, size);
调试完上面的代码后,我得到以下错误。
错误LNK2019:在功能__imp___CrtDbgReportW引用解析外部符号 “受保护:__thiscall并发::细节:: _ RefCounter :: _ RefCounter(长)”(?? 0_RefCounter @细节@ @@并发IAE @Ĵ@ Z)
可以有人回答我为什么我得到以上错误。
太谢谢你了。
如果你想要“多线程调试/ MTd”或“多线程调试DLL/MDd”
运行函数异步也许尝试http://www.tutorialspoint.com/cplusplus/cpp_multithreading.htm – ventaquil
如果你不提供我不能帮你找出导致此错误的任何代码。向我们展示一些代码! “阅读教程”现在是最好的答案。 –