Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

Install problem #7

Closed
sn0wer-al opened this issue Oct 27, 2019 · 2 comments
Closed

Install problem #7

sn0wer-al opened this issue Oct 27, 2019 · 2 comments

Comments

@sn0wer-al
Copy link

/home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c:282:25: error: unknown type name 'http_context_t'; did you mean 'httpd_config_t'? static void cb_GET_file(http_context_t http_ctx, void *ctx) ^~~~~~~~~~~~~~ httpd_config_t /home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c:297:30: error: unknown type name 'http_context_t'; did you mean 'httpd_config_t'? static void cb_PATCH_vehicle(http_context_t http_ctx, void* ctx) ^~~~~~~~~~~~~~ httpd_config_t /home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c: In function 'wifi_init_softap': /home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c:331:2: warning: 'esp_event_loop_init' is deprecated [-Wdeprecated-declarations] ESP_ERROR_CHECK(esp_event_loop_init(event_handler, NULL)); ^~~~~~~~~~~~~~~ In file included from /home/user/esp/esp-idf/components/esp_event/include/esp_event.h:26, from /home/user/esp/esp-idf/components/esp_wifi/include/esp_wifi.h:64, from /home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c:3: /home/user/esp/esp-idf/components/esp_event/include/esp_event_legacy.h:227:11: note: declared here esp_err_t esp_event_loop_init(system_event_cb_t cb, void *ctx) __attribute__ ((deprecated)); ^~~~~~~~~~~~~~~~~~~ /home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c: In function 'app_main': /home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c:387:2: error: unknown type name 'http_server_t'; did you mean 'http_parser_h'? http_server_t server; ^~~~~~~~~~~~~ http_parser_h /home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c:388:2: error: unknown type name 'http_server_options_t'; did you mean 'dhcps_options_t'? http_server_options_t http_options = HTTP_SERVER_OPTIONS_DEFAULT(); ^~~~~~~~~~~~~~~~~~~~~ dhcps_options_t /home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c:388:39: error: implicit declaration of function 'HTTP_SERVER_OPTIONS_DEFAULT' [-Werror=implicit-function-declaration] http_server_options_t http_options = HTTP_SERVER_OPTIONS_DEFAULT(); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/user/esp/esp-idf/components/esp_common/include/esp_timer.h:44, from /home/user/esp/esp-idf/components/freertos/include/freertos/portmacro.h:84, from /home/user/esp/esp-idf/components/freertos/include/freertos/portable.h:94, from /home/user/esp/esp-idf/components/freertos/include/freertos/FreeRTOS.h:105, from /home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c:1: /home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c:391:18: error: implicit declaration of function 'http_server_start'; did you mean 'httpd_start'? [-Werror=implicit-function-declaration] ESP_ERROR_CHECK(http_server_start(&http_options, &server)); ^~~~~~~~~~~~~~~~~ /home/user/esp/esp-idf/components/esp_common/include/esp_err.h:118:31: note: in definition of macro 'ESP_ERROR_CHECK' esp_err_t __err_rc = (x); \ ^ /home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c:392:18: error: implicit declaration of function 'http_register_handler'; did you mean 'httpd_register_err_handler'? [-Werror=implicit-function-declaration] ESP_ERROR_CHECK(http_register_handler(server, "/", HTTP_GET, HTTP_HANDLE_RESPONSE, &cb_GET_file, "/spiflash/index.html")); ^~~~~~~~~~~~~~~~~~~~~ /home/user/esp/esp-idf/components/esp_common/include/esp_err.h:118:31: note: in definition of macro 'ESP_ERROR_CHECK' esp_err_t __err_rc = (x); \ ^ /home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c:392:63: error: 'HTTP_HANDLE_RESPONSE' undeclared (first use in this function); did you mean 'HTTP_RESPONSE'? ESP_ERROR_CHECK(http_register_handler(server, "/", HTTP_GET, HTTP_HANDLE_RESPONSE, &cb_GET_file, "/spiflash/index.html")); ^~~~~~~~~~~~~~~~~~~~ /home/user/esp/esp-idf/components/esp_common/include/esp_err.h:118:31: note: in definition of macro 'ESP_ERROR_CHECK' esp_err_t __err_rc = (x); \ ^ /home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c:392:63: note: each undeclared identifier is reported only once for each function it appears in ESP_ERROR_CHECK(http_register_handler(server, "/", HTTP_GET, HTTP_HANDLE_RESPONSE, &cb_GET_file, "/spiflash/index.html")); ^~~~~~~~~~~~~~~~~~~~ /home/user/esp/esp-idf/components/esp_common/include/esp_err.h:118:31: note: in definition of macro 'ESP_ERROR_CHECK' esp_err_t __err_rc = (x); \ ^ /home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c:392:86: error: 'cb_GET_file' undeclared (first use in this function) ESP_ERROR_CHECK(http_register_handler(server, "/", HTTP_GET, HTTP_HANDLE_RESPONSE, &cb_GET_file, "/spiflash/index.html")); ^~~~~~~~~~~ /home/user/esp/esp-idf/components/esp_common/include/esp_err.h:118:31: note: in definition of macro 'ESP_ERROR_CHECK' esp_err_t __err_rc = (x); \ ^ /home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c:395:18: error: implicit declaration of function 'http_register_form_handler'; did you mean 'httpd_register_err_handler'? [-Werror=implicit-function-declaration] ESP_ERROR_CHECK(http_register_form_handler(server, "/api/vehicle", HTTP_PATCH, HTTP_HANDLE_RESPONSE, &cb_PATCH_vehicle, NULL)); ^~~~~~~~~~~~~~~~~~~~~~~~~~ /home/user/esp/esp-idf/components/esp_common/include/esp_err.h:118:31: note: in definition of macro 'ESP_ERROR_CHECK' esp_err_t __err_rc = (x); \ ^ /home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c:395:104: error: 'cb_PATCH_vehicle' undeclared (first use in this function) ESP_ERROR_CHECK(http_register_form_handler(server, "/api/vehicle", HTTP_PATCH, HTTP_HANDLE_RESPONSE, &cb_PATCH_vehicle, NULL)); ^~~~~~~~~~~~~~~~ /home/user/esp/esp-idf/components/esp_common/include/esp_err.h:118:31: note: in definition of macro 'ESP_ERROR_CHECK' esp_err_t __err_rc = (x); \ ^ /home/user/esp/obd/esp32-obd2-emulator/main/can_demo_main.c:389:12: warning: unused variable 'res' [-Wunused-variable] esp_err_t res; ^~~ cc1: some warnings being treated as errors make[1]: *** [/home/user/esp/esp-idf/make/component_wrapper.mk:292: can_demo_main.o] Ошибка 1 make: *** [/home/user/esp/esp-idf/make/project.mk:609: component-main-build] Ошибка 2

@clfregis
Copy link

I think that this is not a install problem, but an unknow type definition. This happens because in the folder main there is a file named components.mk.
In this file you should include the following line:
COMPONENT_ADD_INCLUDEDIRS := . ../components/http
This should solve your problem. The same thing occurred to me and the user krishanddk helped me as can be seen on issue 4

@clfregis
Copy link

I know pretty much nothing about ESP IoT Development Framework and used it only because of this library.
So I don't know why the aforementioned line was not included as default in the file components.mk.
But, I think that, since it is a recurrent problem, @limiter121 should consider to include it. =D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants