When running PlatformIO under Windows 11, statements like “printf(“value = %d, value);” work just fine for many types of integer such as uint8_t, uint16_t, uint32_t, etc.and even enumerated types and bool. However, when PlatformIO is ported to a Mac, it objects, requring the format to be %lu if value is of type uint32_t for example. How can this be fixed without changing many hundred uses of %d in thousands lines of code. Why is printf so picky when running in a Mac?
I expected that change of OS not to impact on the PlatformIO compiler!
Dik Morling is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.