Struggling on #include directive

No. You have to do extern uint32_t ui32Paolo; here and move uint32_t ui32Paolo = 0; into HowTo.cpp. If your global variable creation is in a header file and it’s included in multiple .cpp files, those .cpp files will each want to create that global variable, leading to multiple definition errors. In the header, you just have to declare that a certain variable variable of a certain type and name exist, but not define it. This is what extern does.

This is a really common beginner C++ mistake when trying to split code accross multiple files. For reference material, see

1 Like