Import an Arduino multifile Project to PlatformIO

Actually, this does not work in the Arduino IDE for me either with the original main.ino and second.ino files shown above.

Can you show an example of multiple ino files with global variables in the style that you do?