首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

undefined reference to'CPU_ZERO'有关问题

2012-06-06 
undefined reference toCPU_ZERO问题我在使用sched_setaffinity将线程和CPU绑定,但总显示“undefined ref

undefined reference to'CPU_ZERO'问题
我在使用sched_setaffinity将线程和CPU绑定,但总显示“undefined reference to'CPU_ZERO'”。我在文件头已经写了
#define __USE_GNU
#include <sched.h>
为什么出现这些问题,怎样解决?谢谢

[解决办法]
1.你看看是不是包含了pthread.h 在sched.h之前如果是这样,那么把他放到后面去。
2.用gcc -E选项来查看一下预处理的代码

good lucky

热点排行