I have compiled a new version (2.30.2) of the Glib2.
If I use Gslapt to remove the "old" Glib2 other pakage are eliminated.
Try using spkg, specifically spkg -u possibly with some other arguments too.
I can upgrade the standard library version with the new one without recompile all the dependent pakages?
Probably you're going to break your system with such a core library upgrade, if the other applications installed (including core system applications) are built for another version that's not compatible. A big part of your system would need a rebuild then and you would need to know how to fix a broken system.
If you know what you're doing, go ahead. Otherwise better not.