Eclipse (Windows) does not find headers in components
Posted: Tue Aug 22, 2017 9:13 am
After setting up the project in eclipse following the instructions for windows machines and makeing it one time to let eclipse collect the header files paths everything works fine for the main.c file.
Then i added a component and included the "esp_log.h" in the components .cpp (yes, the component is written in C++) as well, assuming there should be no problem, since eclipse should already know about this file. It seems it doesn't. The file is marked as unknown and functions defined in it are marked as undefined. Building the project however works without a problem.
I would like to fix this because not having auto-completion and having false errors is really annoying.
The include part of main.c:
The include part of mylogger.cpp
In main.c everything is correct. In mylogger.cpp the line #include "esp_log.h" is marked as "unresolved inclusion" and functions defined in it (e.g. esp_log_set_vprintf()) are, naturally, marked as "undefined".
This presists even after cleaning and then building the project again.
Is there a way to fix this? Even manually would be okay for now.
Then i added a component and included the "esp_log.h" in the components .cpp (yes, the component is written in C++) as well, assuming there should be no problem, since eclipse should already know about this file. It seems it doesn't. The file is marked as unknown and functions defined in it are marked as undefined. Building the project however works without a problem.
I would like to fix this because not having auto-completion and having false errors is really annoying.
The include part of main.c:
Code: Select all
#include <stdio.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "esp_wifi.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_event_loop.h"
#include "esp_log.h"
#include "nvs_flash.h"
#include "driver/gpio.h"
#include "driver/uart.h"
#include "soc/uart_struct.h"
#include "../components/mylogger/mylogger.h"
Code: Select all
#include <cstdio>
#include "FunshineLog.h"
#include "esp_log.h"
This presists even after cleaning and then building the project again.
Is there a way to fix this? Even manually would be okay for now.