How to resolve/suppress error for "static declaration follows non-static declaration" in c ?
Posted: Tue Jan 11, 2022 4:32 pm
Hi All,
I have below system configuration:
Development Kit: ESP32-Ethernet kit_A_V1.1
Kit version
Module or chip used: ESP32
IDF version :v4.2.1
Build System: Make|CMake|idf.py
Compiler version : xtensa-esp32-elf-gcc (crosstool NCG esp-2020r3)8.4.0
Operating System: Windows
(Windows only) environment type: Command Prompt
Using an IDE?: Yes (Eclipse)
I am trying to integrate Pyramid EIP on ESP32. Pyramid EIP code I have taken as it is from my earlier code, which I was able to build on IAR.
When using same code on ESP32 using esp-idf I am getting one error as,
"static declaration of table follows non-static declaration"
I know it is giving error because we have declared same variable as extern in .h file.
I wanted to know is there a way by which I can suppress this error using any flag or something in CMakeList.txt?
Thanks!!
I have below system configuration:
Development Kit: ESP32-Ethernet kit_A_V1.1
Kit version
Module or chip used: ESP32
IDF version :v4.2.1
Build System: Make|CMake|idf.py
Compiler version : xtensa-esp32-elf-gcc (crosstool NCG esp-2020r3)8.4.0
Operating System: Windows
(Windows only) environment type: Command Prompt
Using an IDE?: Yes (Eclipse)
I am trying to integrate Pyramid EIP on ESP32. Pyramid EIP code I have taken as it is from my earlier code, which I was able to build on IAR.
When using same code on ESP32 using esp-idf I am getting one error as,
"static declaration of table follows non-static declaration"
Code: Select all
// In Test.c
static uint8_t table = 0;
in Test.h
extern uint8_t table;
I wanted to know is there a way by which I can suppress this error using any flag or something in CMakeList.txt?
Thanks!!