I have a small problem using enums with chibistudio.
If I compile my project with the following piece of code:
[mod=duracell]typedef enum
{CLOSE_VALVE,
OPEN_VALVE} valve_state;
//valve_state valve1;[/mod]
The compier does its job without errors.
If I de-comment the line of the declaration of valve1 I have the following error:
^
[mod=duracell]Linking build/ch.elf
build/obj/main.o (symbol from plugin): In function `valve1':
(.text+0x0): multiple definition of `valve1'
build/obj/extlib.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [build/ch.elf] Error 1[/mod]
I don't have other declarations of valve1, so I don't know which C rule I am breaking
Thanks to all for reading.