I managed to solve it this way. Here is the complete solution. This would be in a header file typedef enum levels_tag levels_e; enum levels_tag ...
stackoverflow.com