Skip to content

Adding #include "button.h" to my otherwise working code causes a compiler meltdown. #17

@spierepf

Description

@spierepf

I've attached

ESP32-TDisplayDeck.tar.gz

which contains my code. If you comment out the #include <button.h> in line 3 of main/main.c the code will compile fine. However, with that line uncommented, the compiler just melts down.

Here is the tail end of the compile output:

main/main.c:7:20: error: storage class specified for parameter 'TAG'
 static const char *TAG = (__builtin_strrchr(__FILE__, '/') ? __builtin_strrchr(__FILE__, '/') + 1 : __FILE__);
                    ^~~
main/main.c:7:1: error: parameter 'TAG' is initialized
 static const char *TAG = (__builtin_strrchr(__FILE__, '/') ? __builtin_strrchr(__FILE__, '/') + 1 : __FILE__);
 ^~~~~~
main/main.c:9:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 void app_main() {
                 ^
In file included from /home/peter/.platformio/packages/framework-espidf/components/freertos/include/freertos/task.h:36,
                 from /home/peter/.platformio/packages/framework-espidf/components/freertos/include/freertos/queue.h:40,
                 from lib/esp32-button-master/include/button.h:4,
                 from main/main.c:3:
/home/peter/.platformio/packages/framework-espidf/components/freertos/include/freertos/list.h:345:6: error: old-style parameter declarations in prototyped function definition
 void vListInitialise( List_t * const pxList ) PRIVILEGED_FUNCTION;
      ^~~~~~~~~~~~~~~
main/main.c:11: error: expected '{' at end of input
 }
 
cc1: some warnings being treated as errors
*** [.pio/build/ttgo-t1/main/main.o] Error 1
=========================================================================================== [FAILED] Took 16.42 seconds ===========================================================================================
The terminal process "platformio 'run', '--environment', 'ttgo-t1'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions