No matching function call to 'pthread_create'
来源:互联网 发布:智能锁屏软件 编辑:程序博客网 时间:2024/06/10 17:19
以下代码报错:No matching function call to 'pthread_create'
#include <pthread.h>void *draw(void *pt) { // ...}void *input(void *pt) { // ....}void Game::create_threads(void) { pthread_t draw_t, input_t; pthread_create(&draw_t, NULL, &Game::draw, NULL); // Error pthread_create(&input_t, NULL, &Game::draw, NULL); // Error // ...}
原因:
pthread_create的函数必须为 (void*)(*)(void*) 的格式
ref:http://stackoverflow.com/questions/10389384/no-matching-function-call-to-pthread-create
- No matching function call to 'pthread_create'
- no matching function for call to ‘transform
- no matching function for call to ‘transform
- no matching function for call to 'sort(...),
- error: no matching function for call to
- error: no matching function for call to 'MainWindow::connect(*&, ...)
- C++中错误no matching function for call to transform
- [c++]no matching function for call to ‘sort(…)......
- 【C++错误处理】no matching function for call to transform
- Qt creator:no matching function fo call to'*::connect(.....)'
- 【C++错误处理】no matching function for call to transform
- C++常见错误之:no matching function for call to transform
- 【求助】 no matching function for call to `strcpy(std::string&, char*&)'
- error: no matching function for call to 'std::basic_ifstream<char>::open(std::string&)
- cocos2d-2.1beta3-x-2.1.1 "no matching function for call to..."
- C++ STL string 大小写转换时的 no matching function for call to ‘transform 错误
- error: no matching function for call to 'std::basic_ifstream<char>::open(std::string&)
- G++编译错误 no matching function for call to '_tag_data_value::StringAddLen(std::string, int, int)
- android 创建socket 通信型service
- C# dateGRIDVIEW导出EXCEL文件
- JS中截图工具:copper
- Software Craftsmanship : Implement Inversion of Control with Dependency Injection & Service locator
- 在C++中用C#风格设置类的属性值
- No matching function call to 'pthread_create'
- 做一个正气的杭电人
- mysql 远程登录权限设置
- 游戏开发工具之纹理打包器-1.创建界面及连接控件.
- [转]keybd_event 被 SendInput 替代
- Unity 3D 获取手机SD卡目录列表
- How can I always run the command prompt as administrator?
- MC新手入门(四十六)------ 手势支持
- New Features in C++11 学习