hi,
我使用RTOS版SDK, 版本是1.2.0。
程序中使用socket 的select功能,也使用了有关时间的函。
在编译的时候就报出 文件操作函数重复定义的错误。
也就是说 extra_include/sys/types.h和include/lwip/lwip/sockets.h两个文件里面有重复定义!
In file included from ../../extra_include/time.h:29:0,
from user_main.c:35:
../../extra_include/sys/types.h:226:0: error: "FD_SET" redefined [-Werror]
# define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
^
In file included from user_main.c:18:0:
../../include/lwip/lwip/sockets.h:348:0: note: this is the location of the previ
ous definition
#define FD_SET(n, p) ((p)->fd_bits[(n)/8] |= (1 << ((n) & 7)))
^
In file included from ../../extra_include/time.h:29:0,
from user_main.c:35:
../../extra_include/sys/types.h:227:0: error: "FD_CLR" redefined [-Werror]
# define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
^
In file included from user_main.c:18:0:
../../include/lwip/lwip/sockets.h:349:0: note: this is the location of the previ
ous definition
#define FD_CLR(n, p) ((p)->fd_bits[(n)/8] &= ~(1 << ((n) & 7)))
^
In file included from ../../extra_include/time.h:29:0,
from user_main.c:35:
../../extra_include/sys/types.h:228:0: error: "FD_ISSET" redefined [-Werror]
# define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
^
In file included from user_main.c:18:0:
../../include/lwip/lwip/sockets.h:350:0: note: this is the location of the previ
ous definition
#define FD_ISSET(n,p) ((p)->fd_bits[(n)/8] & (1 << ((n) & 7)))
^
In file included from ../../extra_include/time.h:29:0,
from user_main.c:35:
../../extra_include/sys/types.h:229:0: error: "FD_ZERO" redefined [-Werror]
# define FD_ZERO(p) (__extension__ (void)({ \
^
In file included from user_main.c:18:0:
../../include/lwip/lwip/sockets.h:351:0: note: this is the location of the previ
ous definition
#define FD_ZERO(p) memset((void*)(p),0,sizeof(*(p)))
^
user_main.c: In function 'GetTime_task':
user_main.c:4290:3: error: passing argument 2 of 'lwip_select' from incompatible
pointer type [-Werror]
if (select(time_fd + 1, &wfds, NULL, NULL, &sockselect) > 0)
^
In file included from user_main.c:18:0:
../../include/lwip/lwip/sockets.h:393:5: note: expected 'struct fd_set *' but ar
gument is of type 'struct _types_fd_set *'
int lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *excepts
et,
^
cc1: all warnings being treated as errors
../../Makefile:337: recipe for target '.output/eagle/debug/obj/user_main.o' fail
ed
make[2]: *** [.output/eagle/debug/obj/user_main.o] Error 1
请帮忙解答一下!
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.