Thanks @Venet and @luz for your comments. I can see from your other posts that you've been frunstrated by this issue for a long time.
I'm not sure that I'd have bought an Onion Omega2+ if I'd thought it was effectively a closed-source system.
PS.: A more complex software with USB, TCP, threads did compile and run without any problems same way.
Looks like your connection to Onion Community was lost, please wait while we try to reconnect.