create CCRX library with "PORTE.PIDR" undefined

Hi everybody,

I would like to create library to be included in different projects. I currently use:

-CC-RX V3.01.00

-e2studio version 22.7.0.

-MCU RX140

I created a new project with "Renesas CC-RX C/C++ Library Project" and I wrote my .c file. I report a very short example:

#include "stdint.h"
#include "machine.h"
#include "limits.h"

uint8_t Input_state = 0U;

void readInput(void)
    if (0U == PORTE.PIDR.BIT.B5)
        Input_state = 1U;
        Input_state = 0U;

As you can see I read an input pin "PE5". When I compile it gives an error "Identifier PORTE is undefined".

I know that definition is included in "iodefine.h" file which is created by "SmartConfigurator" when I create my projects, but in this case I'm creating a library so I don't know how to include it.

How can I "extern" the "PORTE.PIDR.BIT.B5" so compiler doesn't complain about that?

Thank you and regards