天嵌 ARM开发社区

 找回密码
 注册
查看: 1996|回复: 1

创建任务编译失败

[复制链接]
root_2009 发表于 2009-12-25 16:56:16 | 显示全部楼层 |阅读模式
创建任务编译失败.编译器路径/opt/EmbedSky/4.3.3/bin,代码如下.

#include <sys/time.h>
//#include <sys/ipc.h>
#include <sys/msg.h>
#include <semaphore.h>
#include <time.h>
#include <errno.h>
#include <assert.h>
#include <unistd.h>

if(pthread_create(&task, &attr, (void *)func, param) == 0)
        {
            return task;
        }

54: error: implicit declaration of function 'pthread_attr_init'
59: error: implicit declaration of function 'pthread_attr_setstacksize'
61: error: implicit declaration of function 'pthread_create'
In function 'hl_rtos_task_destroy':
:77: error: implicit declaration of function 'pthread_cancel'
亚瑟王 发表于 2009-12-26 13:09:37 | 显示全部楼层
你编译我们光盘里提供的多线程的测试程序试试。我认为是你的Makefile文件中没有添加线程的编译条件。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-10-6 20:39 , Processed in 1.032266 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表