Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By cyborgmax
#2454 I'm trying to compile your example, but I can't get it to compile, it looks like I need to declare more functions(like putcconn), but where? in a different file or do I need another library besides the one you stated before??
Hope you or someone can help me?
Thanks a lot.

CC driver/adc.c
CC driver/gpio16.c
CC driver/i2c_master.c
CC driver/key.c
CC driver/pwm.c
CC driver/spi_master.c
CC driver/uart.c
CC user/user_main.c
In file included from include/lwip/arch.h:43:0,
from include/lwip/debug.h:35,
from include/lwip/opt.h:46,
from include/lwip/stats.h:35,
from user/user_main.c:6:
include/arch/cc.h:46:0: error: "BYTE_ORDER" redefined [-Werror]
#define BYTE_ORDER LITTLE_ENDIAN
^
In file included from /usr/include/bits/string2.h:51:0,
from /usr/include/string.h:635,
from /opt/Espressif/ESP8266_SDK/include/osapi.h:8,
from user/user_main.c:3:
/usr/include/endian.h:48:0: note: this is the location of the previous definition
# define BYTE_ORDER __BYTE_ORDER
^
user/user_main.c: In function 'tcpserver_connectcb':
user/user_main.c:47:5: error: 'putcconn' undeclared (first use in this function)
putcconn = pespconn;
^
user/user_main.c:47:5: note: each undeclared identifier is reported only once for each function it appears in
user/user_main.c:48:30: error: 'tcp_putc' undeclared (first use in this function)
os_install_putc2((void *)tcp_putc);
^
cc1: all warnings being treated as errors
make: *** [build/user/user_main.o] Error 1
User avatar
By 0ff
#2464 Sorry, this is code taken from a bigger library, I forgot to throw out these two lines.
See my original post for an updated version of the code.

Edit: You need to fix your build environment first, you should never include things in /usr/include/, these are files for your build machine, rather than the esp.