1214032625 发表于 2018-4-10 12:37:32

arduino多线程

我现在调用arduino的ProtoThread库,可是编译的时候报错了:
Arduino:1.6.6 (Windows 10), 开发板:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Users\Administrator\Documents\Arduino\libraries\ProtoThreads\examples\ExampleSmall\ExampleSmall.pde: In function 'int protothread1(pt*)':

ExampleSmall:24: error: 'int protothread1(pt*)' was declared 'extern' and later 'static' [-fpermissive]

static int protothread1(struct pt *pt)

                                    ^

ExampleSmall:24: error: previous declaration of 'int protothread1(pt*)' [-fpermissive]

static int protothread1(struct pt *pt)

   ^

C:\Users\Administrator\Documents\Arduino\libraries\ProtoThreads\examples\ExampleSmall\ExampleSmall.pde: In function 'int protothread2(pt*)':

ExampleSmall:53: error: 'int protothread2(pt*)' was declared 'extern' and later 'static' [-fpermissive]

static int protothread2(struct pt *pt)

                                    ^

ExampleSmall:25: error: previous declaration of 'int protothread2(pt*)' [-fpermissive]

{

   ^

exit status 1
'int protothread1(pt*)' was declared 'extern' and later 'static' [-fpermissive]

报告将会包含更多的信息
"在编译时,输出详细信息"
在 文件>首选项 中启用


是怎么一回事?

wan_2 发表于 2018-6-21 15:50:13

看不懂哦,路过哈哈哈
页: [1]
查看完整版本: arduino多线程