程序如下:
1 #include "contiki.h"
2 #include <stdio.h>3
4 PROCESS(hello_world_process,"hello_world");
5 AUTOSTART_PROCESS(&hello_world_process);
6
7 PROCESS_THREAD(hello_world_process,ev,data)
8 {
9 PROCESS_BEGIN();
10 printf("hello world!\n");
11 PROCESS_END();
12 }
编译结果:
user@instant-contiki:~/lianxi/hello_world$ ls
hello.c
user@instant-contiki:~/lianxi/hello_world$ gcc -o hello hello.c
hello.c:1:21: fatal error: contiki.h: No such file or directory
compilation terminated.
user@instant-contiki:~/lianxi/hello_world$