【发布时间】:2019-05-30 08:38:09
【问题描述】:
我的目标是通过包含 httpclient 在 ldebug.c 中执行 http post 请求。它在 dbg_printf.c 中有效,但在 ldebug.c 中出现编译错误。
In file included from ../ldebug.c:28:0:
../../http/httpclient.h:69:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'http_request'
void ICACHE_FLASH_ATTR http_request(const char * url, const char * method, const char * headers, const char * post_data, http_callback_t callback_handle, int redirect_follow_count);
我可以通过其他方式进行发布请求吗?
【问题讨论】:
-
好像没有定义
ICACHE_FLASH_ATTR。也许您还需要包含其他一些头文件。 -
@lhf 我在 dbg_printf 中包含了 httpclient.h 并且没有收到任何错误。为什么链接器会突然不知道 ICACHE_FLASH_ATTR 是什么意思?
-
不是链接器错误,而是编译器错误。它在 ldebug.c 中不起作用,因为符号 ICACHE_FLASH_ATTR 未在文件包含的头文件中定义。
标签: lua esp8266 nodemcu firmware