编译官方gatt server 例子,将 wifi get started 例子挪过部分code,
报错 unknown type name 'esp_event_handler_instance_t'; did you mean 'esp_event_handler_t',
引入如下:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_wifi.h"
#include "esp_log.h"
#include "esp_bt.h"
#include "esp_gap_ble_api.h"
#include "esp_gatts_api.h"
#include "esp_bt_defs.h"
#include "esp_bt_main.h"
#include "esp_gatt_common_api.h"
#include "sdkconfig.h"
#include "nvs_flash.h"
编译时报错,unknown type name 'esp_event_handler_instance_t'; did you mean 'esp_event_handler_t'
-
- Posts: 290
- Joined: Wed Sep 05, 2018 6:23 am
Re: 编译时报错,unknown type name 'esp_event_handler_instance_t'; did you mean 'esp_event_handler_t'
esp_event_handler_instance_t位于esp_event_base.h中,是8个月前加入的,有没有可能你copy的example是从最新的idf上拿的,而编译用的IDF版本比较老?
Who is online
Users browsing this forum: No registered users and 114 guests