the thing is that when you provide your own main() function, then all the assumptions about a "Bela program" fall apart. The O2O program you started from does no audio processing and is meant to run alongside a "Bela program", for this reason it provides its own main() function.
In your case what you should do is remove the main() function and move its content up to oscReceiver.setup(gLocalPort, parseMessage); to setup() and also provide a render() and cleanup() functions (even if temporarily empty/unused) just like any other Bela C++ program.
If you want to update the display with readings from Trill, then the lines:
while(!gStop)
{
u8g2.clearBuffer();
positionXsensor = gTouchPosition[0];
positionYsensor = gTouchPosition[1];
//drawSensorInputAsBar(u8g2, positionXsensor);
u8g2.drawBox(positionXsensor, 0, 15, 39);
u8g2.sendBuffer();
usleep(10000);
}
are best run in a dedicated thread (can be created with the usual AuxiliaryTask API).