【发布时间】:2014-03-26 07:55:42
【问题描述】:
我的代码在这里:
#define _GNU_SOURCE
#include "lib-ult.h"
#include <stdio.h>
#include <stdlib.h>
#include <ucontext.h>
#include <semaphore.h>
#define TRUE 1
#define FALSE 0
#define FAILURE -1
typedef struct Node {
ucontext_t* context;
int priority;
struct Node* next;
struct Node* prev;
} Node;
int STACK_SIZE = 16384;
sem_t queueLock;
sem_t threadsLock;
当我尝试构建项目时,我得到了Error 1 error C1083: Cannot open include file: 'ucontext.h': No such file or directory(以及 semaphore.h)。
这是为什么?我如何解决它?这与我有一台 Windows 机器有关吗?
谢谢!
【问题讨论】:
-
如何编译这个源文件?