Why can't I print to console from gstdsexample.cpp?

I am trying to print to console from gstdsexample.cpp.

But nothing is printed to console.

Printed with g_print ("Frame Number = %d \n", frame_meta->frame_num); , but doesn’t show to console.
So hard to debug the development.

How can I print to console from gstdsexample.cpp?

Now I found that I need to update the build so file to deepstream’s lib. :)