Things to check Have you included the .h file where the variable or function is defined as “extern”? Is the .c file included in CMakeLists.txt?
Category: Errors
“Unused” Warnings and Errors
GCC compiler flags that control unused warnings include: -Wunused-function-Wunused-label-Wunused-parameter-Wunused-value-Wunused-variable-Wunused (=all of the above) Disable for a single file or section of code
“multiple definition of” errors
Using a local variable of the same name in another part of the application Declaring a variable like this: creates it as visible across all translation units. Even if you don’t use it as “extern int MyVariableName;” somewhere else, it’s still visible across all files. If you go and do the same thing again, create […]
error: macro expands to multiple statements
An example of what will cause it: Ideally you’d call a function instead, but there is a recommended workaround:
fatal error: ###.h: No such file or directory
E.g: fatal error: #####/#######.h: No such file or directory Your CMakeLists.txt has a REQUIRES section? This example is specific to the Espressif ESP-IDF, may be different for other SDKs If you don’t have a REQUIRES list in CMakeLists.txt that is declaring dependencies on certain special components, you don’t have to add basic components as REQUIRES […]