STM Nucleo-32 model L432KC - Compile error

I am trying to use the board STM Nucleo-32 model L432KC. I successfully configured the board manager and installed the proper library. If I run a specific examples (or even a standard Arduino example) it works perfectly. Then I tried to compile a software I wrote for anothe platform, with proper modifcation of course, but what I get is the following error:

C:\Users\skunkworks2\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.5.0\libraries\Wire\src/Wire.h:54:5: error: 'i2c_t' does not name a type

     i2c_t _i2c;

I cannot find out out to solve it.

Could someone help me please?

Can you please post the code that generated that error?

I cannot report the entire code, I can simply attach the library (seeattachments).
But I would like to repeat that with the same lobrary and anothe provided example, the code works.


Wire.h (3.28 KB)

Wire.cpp (12.1 KB)

I know the Wire library in the ST core, the type i2c_t should be declared in the file twi.h in cores/arduino/stm32 that should be automatically included when you compile for an ST board. So it seems to me that it may be some issue with the way you include libraries in the sketch you are writing. If you can't share your code it's fine, but I can't help you much further than this.

Thanks a lot for the answer! But is there a way to check if a proper Arduino core is included or to force to include that specific core?

In particular, using verbose output, I get this:

Uso la libreria Wire alla versione 1.0 nella cartella: C:\Users\skunkworks2\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.5.0\libraries\Wire 
Uso la libreria arduino-sht-master alla versione 1.1.0 nella cartella: C:\Users\skunkworks2\Documents\Arduino\libraries\arduino-sht-master 
exit status 1
Errore durante la compilazione per la scheda Nucleo-32.